Skip to content

Commit

Permalink
test(pubsublite): fix flaky TestRoutingPublisherUnloadIdlePublisher (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tmdiep authored Aug 24, 2023
1 parent 3d8c2c8 commit 236904e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pubsublite/internal/wire/publisher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ func TestRoutingPublisherUnloadIdlePublisher(t *testing.T) {
mockServer.OnTestStart(verifiers)
defer mockServer.OnTestEnd()

unloadDelay := time.Millisecond * 10
unloadDelay := time.Millisecond * 20
pub := newTestRoutingPublisher(t, clientID, topic, testPublishSettings(), unloadDelay, 0)
if gotErr := pub.WaitStarted(); gotErr != nil {
t.Errorf("Start() got err: (%v)", gotErr)
Expand All @@ -608,9 +608,9 @@ func TestRoutingPublisherUnloadIdlePublisher(t *testing.T) {
for i, msg := range msgs {
result := pub.Publish(msg)
result.ValidateResult(0, 10+int64(i))
time.Sleep(unloadDelay / 2)
}

time.Sleep(unloadDelay * 2)
result2 := pub.Publish(msg2)
result2.ValidateResult(1, 22)

Expand Down

0 comments on commit 236904e

Please sign in to comment.