Skip to content

Commit

Permalink
fix test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
amirylm committed Jul 5, 2024
1 parent d497698 commit 454e3de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/gossipsub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func TestGossipSimulation(t *testing.T) {
<-time.After(time.Second * 4) // TODO: avoid timeout

// starting fresh trace after subscriptions
startupFaucets := traceFaucets{}
startupFaucets := newTraceFaucets()
pubsubRpcCount := new(atomic.Uint64)
for _, ctrl := range ctrls {
startupFaucets.add(ctrl.psTracer.faucets)
Expand Down Expand Up @@ -278,7 +278,7 @@ func TestGossipSimulation(t *testing.T) {

<-time.After(time.Second * 2) // TODO: avoid timeout

faucets := traceFaucets{}
faucets := newTraceFaucets()
var pubsubRpcCount uint64
for _, ctrl := range ctrls {
nodeFaucets := ctrl.psTracer.faucets
Expand Down
2 changes: 1 addition & 1 deletion core/pubsub_trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (pst *psTracer) Reset() {
defer pst.lock.Unlock()

pst.events = nil
pst.faucets = traceFaucets{}
pst.faucets = newTraceFaucets()
}

func (pst *psTracer) Events() []eventFields {
Expand Down

0 comments on commit 454e3de

Please sign in to comment.