@@ -144,13 +144,7 @@ func TestAtxHandler_Retry(t *testing.T) {
144
144
var eg errgroup.Group
145
145
eg .Go (func () error {
146
146
for {
147
- // FIXME: BlockUntilContext is not included in FakeClock interface.
148
- // This will be fixed in a post-0.4.0 clockwork release, but with a breaking change that
149
- // makes FakeClock a struct instead of an interface.
150
- // See: https://github.com/jonboulle/clockwork/pull/71
151
- clock .(interface {
152
- BlockUntilContext (ctx context.Context , n int ) error
153
- }).BlockUntilContext (ctx , 1 )
147
+ clock .BlockUntilContext (ctx , 1 )
154
148
if ctx .Err () != nil {
155
149
return nil
156
150
}
@@ -213,7 +207,7 @@ func TestAtxHandler_BatchRetry(t *testing.T) {
213
207
return h .Commit (context .Background (), peer , baseSet , atxSeqResult (allAtxs ))
214
208
})
215
209
// wait for delay after 1st batch failure
216
- clock .BlockUntil ( 1 )
210
+ clock .BlockUntilContext ( context . Background (), 1 )
217
211
toFetch := make (map [types.ATXID ]bool )
218
212
for _ , id := range allAtxs {
219
213
toFetch [id ] = true
@@ -272,7 +266,7 @@ func TestAtxHandler_BatchRetry_Fail(t *testing.T) {
272
266
return h .Commit (context .Background (), peer , baseSet , sr )
273
267
})
274
268
for range 2 {
275
- clock .BlockUntil ( 1 )
269
+ clock .BlockUntilContext ( context . Background (), 1 )
276
270
clock .Advance (testCfg .FailedBatchDelay )
277
271
}
278
272
require .Error (t , eg .Wait ())
0 commit comments