fixed reconnect test (it doesn't need to reconnect via a different

thread now)
This commit is contained in:
nathan 2016-03-17 02:58:58 +01:00
parent e2cdcab9ea
commit 14ec10e41a

View File

@ -78,23 +78,19 @@ class ReconnectTest extends BaseTest {
stopEndPoints();
return;
}
new Thread() {
@Override
public
void run() {
System.out.println("Reconnecting: " + reconnectCount.get());
try {
client.reconnect();
} catch (IOException e) {
e.printStackTrace();
}
}
}.start();
System.out.println("Reconnecting: " + reconnectCount.get());
try {
client.reconnect();
} catch (IOException e) {
e.printStackTrace();
}
}
});
client.connect(5000);
waitForThreads(10);
waitForThreads();
System.err.println("Connection count (after reconnecting) is: " + reconnectCount.get());
assertEquals(3, reconnectCount.get());
}