libp2p / go-libp2p-kad-dht

A Kademlia DHT implementation on go-libp2p
https://github.com/libp2p/specs/tree/master/kad-dht
MIT License
516 stars 221 forks source link

Port query-oriented tests from v1 to v2 #888

Closed iand closed 9 months ago

iand commented 10 months ago

Port all the tests that rely on query behaviour to v2 to ensure we follow existing behaviours as closely as possible.

### Tasks
- [ ] https://github.com/libp2p/go-libp2p-kad-dht/pull/887
guillaumemichel commented 10 months ago

We need to be careful not to transfer the flaky tests.

BigLep commented 9 months ago

Do we have metrics to see what our test coverage is?

dennis-tra commented 9 months ago

Current stats of v2-develop all files in the v2 subdirectory:

BigLep commented 9 months ago

Thanks @dennis-tra for the stats. I should have been more clear to make sure we have a mechanism in place to ensure good test coverage, something along the lines of:

  1. Measurements are automatically produced
  2. They're included in a PR
  3. We have gates that requires new code to have at least X% coverage etc.
dennis-tra commented 9 months ago

@BigLep ah sorry, yup, that's already happening! Here's an example from a recent PR:

image

However, the metrics are included in the PR as a comment. Also, we don't have a gate that requires a certain coverage percentage. I would also a be bit skeptical about the merit of such a gate.

iand commented 9 months ago

The majority of these have now been done as part of implementation of the routing.Routing interface methods