Commit 916513af authored by Michael de Hoog's avatar Michael de Hoog

Fix flaky test

parent 70af5045
...@@ -87,6 +87,11 @@ func (ibc *IterativeBatchCall[K, V]) Fetch(ctx context.Context) error { ...@@ -87,6 +87,11 @@ func (ibc *IterativeBatchCall[K, V]) Fetch(ctx context.Context) error {
ibc.resetLock.RLock() ibc.resetLock.RLock()
defer ibc.resetLock.RUnlock() defer ibc.resetLock.RUnlock()
// return early if context is Done
if ctx.Err() != nil {
return ctx.Err()
}
// collect a batch from the requests channel // collect a batch from the requests channel
batch := make([]rpc.BatchElem, 0, ibc.batchSize) batch := make([]rpc.BatchElem, 0, ibc.batchSize)
// wait for first element // wait for first element
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment