ipfs / go-bitswap

The golang implementation of the bitswap protocol
MIT License
216 stars 112 forks source link

Fix flaky TestNetworkCounters tests #496

Closed hannahhoward closed 3 years ago

hannahhoward commented 3 years ago

Goals

Fix TestNetworkCounters flakiness part of fixing ipfs/go-libipfs#86

Implemenation

The problem is just a race in counting messages, and I've dealt with that by moving the counting to immediately before the call that advances the test. I don't think it's relevant to Bitswap execution otherwise.