libp2p / jvm-libp2p

a libp2p implementation for the JVM, written in Kotlin 🔥
https://libp2p.io
Apache License 2.0
270 stars 75 forks source link

Fix unit test consistency #333

Closed StefanBratanov closed 1 year ago

StefanBratanov commented 1 year ago

There is a tiny possibility the test reaches the test configured maxBufferedConnectionWrites (512) if the randomly selected indices are at the end (total bytes sent in this test are 1392), so made it so that 20 indices are selected from every 100 indices in which case the maxBufferedConnectionWrites will never be reached.