Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
  • Loading branch information
joshua-kim committed Dec 18, 2023
1 parent 0d55912 commit 569f316
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions vms/platformvm/network/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/ava-labs/avalanchego/snow"
"github.com/ava-labs/avalanchego/snow/engine/common"
snowvalidators "github.com/ava-labs/avalanchego/snow/validators"
"github.com/ava-labs/avalanchego/utils"
"github.com/ava-labs/avalanchego/utils/crypto/secp256k1"
"github.com/ava-labs/avalanchego/utils/set"
"github.com/ava-labs/avalanchego/vms/components/avax"
Expand Down Expand Up @@ -749,7 +750,7 @@ func TestNetworkOutboundTxPullGossip(t *testing.T) {
maxValidatorSetStaleness,
)

var called bool
called := utils.Atomic[bool]{}
network, err := New(
snowCtx,
mempool,
Expand All @@ -760,7 +761,7 @@ func TestNetworkOutboundTxPullGossip(t *testing.T) {
gossip.NoOpAccumulator[*txs.Tx]{},
&gossip.TestGossiper{
GossipF: func(context.Context) error {
called = true
called.Set(true)
return nil
},
},
Expand All @@ -774,7 +775,7 @@ func TestNetworkOutboundTxPullGossip(t *testing.T) {
require.NoError(network.Connected(ctx, tt.nodeID, nil))

go network.Gossip(ctx)
require.Eventually(func() bool { return tt.expected == called }, time.Minute, time.Second)
require.Eventually(func() bool { return tt.expected == called.Get() }, time.Minute, time.Second)
})
}
}
Expand Down

0 comments on commit 569f316

Please sign in to comment.