kaisun2000 commented on a change in pull request #1218:
URL: https://github.com/apache/helix/pull/1218#discussion_r467527907
##########
File path:
helix-core/src/test/java/org/apache/helix/integration/task/TestNoDoubleAssign.java
##########
@@ -42,7 +42,7 @@
import org.testng.annotations.Test;
public class TestNoDoubleAssign extends TaskTestBase {
- private static final int THREAD_COUNT = 10;
+ private static final int THREAD_COUNT = 1;
Review comment:
pollForDoubleAssign() also use this one.
This test has a bad design. Aside from the race condition which cause leak,
you will see that breakConnection() and pollForDoubleAssign() does not really
reliably reproduce the problem.
See the other discussion with JJ, the proposed fix is:
```
_executorServiceConnection.scheduleAtFixedRate(() -> {
// Randomly pick a Participant and cause a transient connection issue
synchronized (_executorServiceConnection) {
int participantIndex = RANDOM.nextInt(_numNodes);
stopParticipant(participantIndex);
startParticipant(participantIndex);
}
}, 0L, CONNECTION_DELAY, TimeUnit.MILLISECONDS);
```
Let me know what is your take? Since the proposed fix from you and JJ are
different.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]