update whisper test. move ports out of private ranges and specify ip address.

This commit is contained in:
subtly 2015-01-22 19:50:33 -05:00
parent 64ea4a1959
commit cc9a7cbb71

View File

@ -36,15 +36,16 @@ BOOST_AUTO_TEST_CASE(topic)
auto oldLogVerbosity = g_logVerbosity; auto oldLogVerbosity = g_logVerbosity;
g_logVerbosity = 0; g_logVerbosity = 0;
Host ph1("Test", NetworkPreferences(30303, "127.0.0.1", true, true));
bool started = false; bool started = false;
unsigned result = 0; unsigned result = 0;
std::thread listener([&]() std::thread listener([&]()
{ {
setThreadName("other"); setThreadName("other");
Host ph("Test", NetworkPreferences(50303, "", false, true)); auto wh = ph1.registerCapability(new WhisperHost());
auto wh = ph.registerCapability(new WhisperHost()); ph1.start();
ph.start();
started = true; started = true;
@ -67,12 +68,12 @@ BOOST_AUTO_TEST_CASE(topic)
while (!started) while (!started)
this_thread::sleep_for(chrono::milliseconds(50)); this_thread::sleep_for(chrono::milliseconds(50));
Host ph("Test", NetworkPreferences(50300, "", false, true)); Host ph("Test", NetworkPreferences(30300, "127.0.0.1", true, true));
auto wh = ph.registerCapability(new WhisperHost()); auto wh = ph.registerCapability(new WhisperHost());
this_thread::sleep_for(chrono::milliseconds(500)); this_thread::sleep_for(chrono::milliseconds(500));
ph.start(); ph.start();
this_thread::sleep_for(chrono::milliseconds(500)); this_thread::sleep_for(chrono::milliseconds(500));
ph.addNode(NodeId(), "127.0.0.1", 50303, 50303); ph.addNode(ph1.id(), "127.0.0.1", 30303, 30303);
KeyPair us = KeyPair::create(); KeyPair us = KeyPair::create();
for (int i = 0; i < 10; ++i) for (int i = 0; i < 10; ++i)