fix: flaky TestForcePublish

This commit is contained in:
Dirk McCormick 2021-02-08 12:05:44 +01:00
parent 6de62411c6
commit af45b299e7

View File

@ -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 {