diff --git a/internal/core/posts/queue_test.go b/internal/core/posts/queue_test.go index 0315873..f32f4c5 100644 --- a/internal/core/posts/queue_test.go +++ b/internal/core/posts/queue_test.go @@ -115,9 +115,9 @@ func (e *fakeEngine) communityOrder() []string { // queueClock is a mutable instant the driver reads through Clock. type queueClock struct{ at time.Time } -func (c *queueClock) now() Clock { return func() time.Time { return c.at } } -func (c *queueClock) advance(d time.Duration) { c.at = c.at.Add(d) } -func newQueueClock() *queueClock { return &queueClock{at: time.Date(2026, 8, 8, 9, 0, 0, 0, time.UTC)} } +func (c *queueClock) now() Clock { return func() time.Time { return c.at } } +func (c *queueClock) advance(d time.Duration) { c.at = c.at.Add(d) } +func newQueueClock() *queueClock { return &queueClock{at: time.Date(2026, 8, 8, 9, 0, 0, 0, time.UTC)} } func subject(community, rkey string) PendingSubject { return PendingSubject{ CommunityDID: community, diff --git a/tests/e2e/author_post_contract_test.go b/tests/e2e/author_post_contract_test.go index 645a935..a634e81 100644 --- a/tests/e2e/author_post_contract_test.go +++ b/tests/e2e/author_post_contract_test.go @@ -148,8 +148,15 @@ func awaitStatus(t *testing.T, p *pipeline, postURI, communityDID, want, descrip var observed postStatusView p.Await(t, description, func() (bool, error) { view, err := p.PostStatus(context.Background(), postURI, communityDID) - if pending, wrapped := testkit.PendingIfNotFound(err); wrapped != nil || pending { - return false, wrapped + // NOT testkit.PendingIfNotFound: it is for probes where a successful read + // IS the answer, so its nil case reports DONE — which here would end the + // wait before the status was compared. This wait needs the opposite: a + // successful read is where the question starts. + if err != nil { + if testkit.IsNotFound(err) { + return false, nil + } + return false, err } observed = view return view.Status == want, nil