diff --git a/markets/storageadapter/dealpublisher_test.go b/markets/storageadapter/dealpublisher_test.go index 4733a2050..746c67d0e 100644 --- a/markets/storageadapter/dealpublisher_test.go +++ b/markets/storageadapter/dealpublisher_test.go @@ -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 {