fix the autodiscovery test
add discovery tests
Merge branch 'node-discovery' into async-tornado
Address tarek's review