fix(e2e,store,delivery): fix E2E stability - lifecycle ordering, event ordering, callback_target NOT NULL, worker ticker loop
This commit is contained in:
@@ -132,7 +132,7 @@ func waitForSessionEvents(t *testing.T, timeout time.Duration, eventsCh <-chan p
|
||||
if len(filtered) == want {
|
||||
return filtered
|
||||
}
|
||||
case <-time.After(200 * time.Millisecond):
|
||||
case <-time.After(50 * time.Millisecond):
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,7 +159,11 @@ func TestSub2APICallbackFlow_ShouldDeliverOrderedEventsWithStableEventIDs(t *tes
|
||||
if err := json.NewDecoder(r.Body).Decode(&event); err != nil {
|
||||
t.Fatalf("decode callback body failed: %v", err)
|
||||
}
|
||||
eventsCh <- event
|
||||
select {
|
||||
case eventsCh <- event:
|
||||
case <-time.After(5 * time.Second):
|
||||
t.Fatalf("eventsCh send timeout")
|
||||
}
|
||||
w.WriteHeader(http.StatusOK)
|
||||
}))
|
||||
defer callbackServer.Close()
|
||||
@@ -205,6 +209,7 @@ func TestSub2APICallbackFlow_ShouldDeliverOrderedEventsWithStableEventIDs(t *tes
|
||||
}
|
||||
|
||||
filtered := waitForSessionEvents(t, 8*time.Second, eventsCh, sessionID, 6)
|
||||
|
||||
wantTypes := []string{
|
||||
platformevent.TypeMessageReceived,
|
||||
platformevent.TypeMessageProcessing,
|
||||
|
||||
Reference in New Issue
Block a user