fixed reconnect test (it doesn't need to reconnect via a different
thread now)
This commit is contained in:
parent
e2cdcab9ea
commit
14ec10e41a
@ -78,23 +78,19 @@ class ReconnectTest extends BaseTest {
|
|||||||
stopEndPoints();
|
stopEndPoints();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
new Thread() {
|
|
||||||
@Override
|
|
||||||
public
|
|
||||||
void run() {
|
|
||||||
System.out.println("Reconnecting: " + reconnectCount.get());
|
System.out.println("Reconnecting: " + reconnectCount.get());
|
||||||
try {
|
try {
|
||||||
client.reconnect();
|
client.reconnect();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}.start();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
client.connect(5000);
|
client.connect(5000);
|
||||||
|
|
||||||
waitForThreads(10);
|
waitForThreads();
|
||||||
System.err.println("Connection count (after reconnecting) is: " + reconnectCount.get());
|
System.err.println("Connection count (after reconnecting) is: " + reconnectCount.get());
|
||||||
assertEquals(3, reconnectCount.get());
|
assertEquals(3, reconnectCount.get());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user