Skip to content

Commit a64f461

Browse files
committed
sweepbatcher: fix usage of EventuallyWithT
It should use the c variable passed into the lambda, not the parent t. It should use assert, not require package.
1 parent f0f64f8 commit a64f461

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sweepbatcher/sweep_batcher_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ func testDelays(t *testing.T, store testStore, batcherStore testBatcherStore) {
950950
// Wait for batch publishing to be skipped, because initialDelay has not
951951
// ended.
952952
require.EventuallyWithT(t, func(c *assert.CollectT) {
953-
require.Contains(t, testLogger.debugMessages, stillWaitingMsg)
953+
assert.Contains(c, testLogger.debugMessages, stillWaitingMsg)
954954
}, test.Timeout, eventuallyCheckFrequency)
955955

956956
// Advance the clock to the end of initialDelay.
@@ -1274,7 +1274,7 @@ func testDelays(t *testing.T, store testStore, batcherStore testBatcherStore) {
12741274

12751275
// Wait for sweep to be added to the batch.
12761276
require.EventuallyWithT(t, func(c *assert.CollectT) {
1277-
require.Contains(t, testLogger2.infoMessages, "adding sweep %x")
1277+
assert.Contains(c, testLogger2.infoMessages, "adding sweep %x")
12781278
}, test.Timeout, eventuallyCheckFrequency)
12791279

12801280
// Advance the clock by publishDelay. Don't wait largeInitialDelay.

0 commit comments

Comments
 (0)