nim-libp2p
nim-libp2p copied to clipboard
Test coverage
A few areas that appeared not to trigger any test failures when refactoring the code - some may be covered partially but might need more variation:
- [ ] Peer disconnection - ensure that cleanup happens in gossipsub, connection manager etc
- [ ] Peer reconnection - ensure that after disconnection and reconnection, peer gets messages again
- [ ] Error handling at each level of protocol negotiation - in particular, simulate failures during:
- tcp connection (connect to inexistent peer, break off incoming connection without sending data)
- secure negotiation (no secure protocol, failures while negotiating etc)
- multiplexer negotiation (invalid channels etc)
- multistream negotiation (missing handshakes, failed selection etc)
- failed identify (different peer id etc)
- breaking protocol limits (too large mplex frame, too large multiselect negotiation message without
\n)
- [ ] connection limits - too many connections to same peer
- [ ] mplex close sequence - order of events such as
CloseEventcoming after closemessage etc - [ ] gossipsub write limits - disconnect on too much in channel send log
Done so far on my side:
- connect to inexistent peer
- secure negotiation (no secure protocol, failures while negotiating etc)
Related to #370, still needs to be revised.