libp2p / jvm-libp2p

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

Test coverage of MultiplexHandler/Channel #27

Open Nashatyrev opened 5 years ago

Nashatyrev commented 5 years ago

Cover the MultiplexHandler/Channel classes with unit tests. These are pretty central and non-primitive classes so they should be tested well. Primary attention should paid to closing child channels, so once the channel is created it must be finally closed. Child channels shouldn't leak. There are following close circumstances:

Child channels may be created with MultiplexHandler.createStream() asynchronously from any thread and prior to the parent channel is activated. Those cases should also be considered.

jezhiggins commented 4 years ago

While it doesn't cover all the points raised here, I have add some additional multiplex tests in my refactor/multiplex branch.

arseniy-gl commented 1 year ago

Do it relevant?