Skip to content

Commit 20ddf98

Browse files
AchoArnoldCopilot
andcommitted
fix(tests): poll message 2 status before asserting bulk counts
The TestBulkSMS_Excel test had a race condition where message 2 might not have transitioned from pending to scheduled by the time the bulk history endpoint was checked. Now we explicitly poll for message 2 to reach scheduled status before verifying counts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e433762 commit 20ddf98

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/integration_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,10 @@ func TestBulkSMS_Excel(t *testing.T) {
545545
msg1 := pollMessageStatus(ctx, t, msgID1, "delivered", 15*time.Second)
546546
assert.Equal(t, "delivered", msg1.Status)
547547

548+
// Poll until message 2 reaches "scheduled" (FCM push sent but no SENT event fired)
549+
msg2 := pollMessageStatus(ctx, t, msgID2, "scheduled", 15*time.Second)
550+
assert.Equal(t, "scheduled", msg2.Status)
551+
548552
// Verify bulk-messages history endpoint
549553
entries := fetchBulkMessages(ctx, t)
550554
entry := findBulkEntry(entries, requestID)

0 commit comments

Comments
 (0)