HoustonPutman commented on a change in pull request #759:
URL: https://github.com/apache/solr/pull/759#discussion_r836503361
##########
File path: solr/core/src/test/org/apache/solr/cloud/LeaderElectionTest.java
##########
@@ -531,32 +533,30 @@ public void run() {
};
Thread connLossThread =
- new Thread() {
- @Override
- public void run() {
-
- while (!stopStress) {
- try {
- Thread.sleep(50);
- int j;
- j = random().nextInt(threads.size());
+ new Thread(
+ () -> {
+ while (!stopStress) {
try {
- threads.get(j).es.zkClient.getSolrZooKeeper().closeCnxn();
- if (random().nextBoolean()) {
- long sessionId =
zkClient.getSolrZooKeeper().getSessionId();
- server.expire(sessionId);
+ Thread.sleep(50);
+ int j;
+ j = random().nextInt(threads.size());
+ try {
+ ZooKeeper zk = threads.get(j).es.zkClient.getZooKeeper();
+ assertTrue(zk instanceof TestableZooKeeper);
+ ((TestableZooKeeper) zk).testableConnloss();
+ if (random().nextBoolean()) {
+ server.expire(zk.getSessionId());
Review comment:
Ahhh sorry I forgot to mention this Mike, I had already fixed it on my
curator branch when we were talking.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]