This is an automated email from the ASF dual-hosted git repository.
jiajunwang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/helix.git
The following commit(s) were added to refs/heads/master by this push:
new 353dee1 Fix TestStateTransitionAppFailureHandling by adding
additional Null check. (#1554)
353dee1 is described below
commit 353dee19636804e6d705720ad21892288051fb07
Author: Jiajun Wang <[email protected]>
AuthorDate: Tue Nov 24 15:54:25 2020 -0800
Fix TestStateTransitionAppFailureHandling by adding additional Null check.
(#1554)
Since the test happens after a new cluster creating, it is possible that
some of the initialization messages are removed during the test logic.
This may cause NPE in some race conditions. This change adds a check to
avoid the Null from being checked.
---
.../integration/paticipant/TestStateTransitionAppFailureHandling.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/helix-core/src/test/java/org/apache/helix/integration/paticipant/TestStateTransitionAppFailureHandling.java
b/helix-core/src/test/java/org/apache/helix/integration/paticipant/TestStateTransitionAppFailureHandling.java
index e3ac398..12ede56 100644
---
a/helix-core/src/test/java/org/apache/helix/integration/paticipant/TestStateTransitionAppFailureHandling.java
+++
b/helix-core/src/test/java/org/apache/helix/integration/paticipant/TestStateTransitionAppFailureHandling.java
@@ -102,7 +102,7 @@ public class TestStateTransitionAppFailureHandling extends
ZkStandAloneCMTestBas
.map(childName -> keyBuilder.message(instanceName, childName))
.collect(Collectors.toList()), true);
for (Message message : messageList) {
- if (message.getMsgState() != Message.MessageState.UNPROCESSABLE) {
+ if (message == null || message.getMsgState() !=
Message.MessageState.UNPROCESSABLE) {
return false;
}
}