nim-libp2p icon indicating copy to clipboard operation
nim-libp2p copied to clipboard

Test coverage

Open arnetheduck opened this issue 5 years ago • 2 comments

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 CloseEvent coming after closemessage etc
  • [ ] gossipsub write limits - disconnect on too much in channel send log

arnetheduck avatar Sep 29 '20 14:09 arnetheduck

Done so far on my side:

  • connect to inexistent peer
  • secure negotiation (no secure protocol, failures while negotiating etc)

sinkingsugar avatar Nov 05 '20 10:11 sinkingsugar

Related to #370, still needs to be revised.

dryajov avatar Feb 02 '21 14:02 dryajov