Skip to content

Commit

Permalink
fix: flaky TestForcePublish
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkmc committed Feb 8, 2021
1 parent 6de6241 commit af45b29
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions markets/storageadapter/dealpublisher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,12 @@ func publishDeal(t *testing.T, dp *DealPublisher, ctxCancelled bool, expired boo

go func() {
_, err := dp.Publish(pctx, deal)

// If the test has completed just bail out without checking for errors
if ctx.Err() != nil {
return
}

if ctxCancelled || expired {
require.Error(t, err)
} else {
Expand Down

0 comments on commit af45b29

Please sign in to comment.