Skip to content

Commit

Permalink
test(pubsublite): fix flaky TestIntegration_PublishSubscribeSinglePar…
Browse files Browse the repository at this point in the history
…tition (#7098)
  • Loading branch information
tmdiep authored Nov 23, 2022
1 parent 9cb00af commit eddaf71
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pubsublite/pscompat/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,7 @@ func TestIntegration_PublishSubscribeSinglePartition(t *testing.T) {
t.Run("CancelPublisherContext", func(t *testing.T) {
cctx, cancel := context.WithCancel(context.Background())
publisher := publisherClient(cctx, t, DefaultPublishSettings, topicPath)
defer publisher.Stop()

cancel()

Expand All @@ -587,10 +588,6 @@ func TestIntegration_PublishSubscribeSinglePartition(t *testing.T) {
if _, gotErr := result.Get(ctx); !test.ErrorEqual(gotErr, wantErr) {
t.Errorf("Publish() got err: %v, want err: %v", gotErr, wantErr)
}

if gotErr := publisher.Error(); !test.ErrorEqual(gotErr, wantErr) {
t.Errorf("Error() got err: %v, want err: %v", gotErr, wantErr)
}
})

// Verifies that cancelling the context passed to NewSubscriberClient can shut
Expand Down

0 comments on commit eddaf71

Please sign in to comment.