Skip to content

Commit

Permalink
Remove block builder test (ava-labs#1065)
Browse files Browse the repository at this point in the history
* Remove block builder test

* add attempt await
  • Loading branch information
darioush authored Jan 26, 2024
1 parent 88e05fb commit ae94111
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 73 deletions.
73 changes: 0 additions & 73 deletions plugin/evm/block_builder_test.go

This file was deleted.

18 changes: 18 additions & 0 deletions plugin/evm/gossipper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,3 +424,21 @@ func TestMempoolTxsPriorityRegossip(t *testing.T) {
assert.Len(queued, 10, "unexpected length of queued txs")
assert.ElementsMatch(txs, queued)
}

func attemptAwait(t *testing.T, wg *sync.WaitGroup, delay time.Duration) {
ticker := make(chan struct{})

// Wait for [wg] and then close [ticket] to indicate that
// the wait group has finished.
go func() {
wg.Wait()
close(ticker)
}()

select {
case <-time.After(delay):
t.Fatal("Timed out waiting for wait group to complete")
case <-ticker:
// The wait group completed without issue
}
}

0 comments on commit ae94111

Please sign in to comment.