junkaixue commented on code in PR #2579:
URL: https://github.com/apache/helix/pull/2579#discussion_r1276755115
##########
meta-client/src/test/java/org/apache/helix/metaclient/puppy/AbstractPuppy.java:
##########
@@ -55,30 +55,23 @@ public AbstractPuppy(MetaClientInterface<String>
metaclient, PuppySpec puppySpec
@Override
public void run() {
try {
- while (true) {
+ while (!Thread.currentThread().isInterrupted()) {
Review Comment:
Was this main thread set daemon? If yes, we don't have check the interrupted
here.
##########
meta-client/src/test/java/org/apache/helix/metaclient/impl/zk/TestMultiThreadStressTest/TestMultiThreadStressZKClient.java:
##########
@@ -217,13 +225,13 @@ public void testComplexParentListenerPuppy() {
AtomicInteger globalChildChangeCounter = new AtomicInteger();
ChildChangeListener childChangeListener = (changedPath, changeType) -> {
globalChildChangeCounter.addAndGet(1);
- System.out.println("-------------- Child change detected: " + changeType
+ " at path: " + changedPath + " number of changes: " +
globalChildChangeCounter.get());
+ System.out.println("-------------- Child change detected: " + changeType
+ + " at path: " + changedPath + " number of changes: " +
globalChildChangeCounter.get());
};
-
-
_zkMetaClient.subscribeChildChanges(zkParentKey, childChangeListener,
false);
- PuppySpec puppySpec = new PuppySpec(PuppyMode.REPEAT, 0.2f, new
ExecDelay(5000, 0.1f), 5);
+ PuppySpec puppySpec = new PuppySpec(PuppyMode.REPEAT, 0.2f,
+ new ExecDelay(5000, 0.1f), 5);
Review Comment:
NIT: would suggest to have style, refactor based PR a separate one. It can
distract the review from core logic.
--
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]