Closed chrismwendt closed 9 years ago
Wow, great work. I'm sure this method took a lot of trial and error to come up with.
It may be inelegant, but it works. Hopefully this plugin will stay small so we won't have to write many more tests like it.
:+1:
Thanks! And yes, that method took a while to get right :persevere:
This PR adds an integration test which verifies that 2 nodes can find each other via SRV records. The DNS queries are mocked, so there is no need to run a DNS server - just
mvn test
.Here's what's new:
srvtest
discovery type (for the sole purpose of testing, admittedly polluting the main code)buildResolver
to return the same hard-coded ports that the test uses when starting 2 nodesThe approach taken to get this test to work is not elegant and could likely be improved. But hey, it works!
Closes #5
/cc @github/search