This is an automated email from the ASF dual-hosted git repository.
exceptionfactory pushed a commit to branch support/nifi-1.x
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/support/nifi-1.x by this push:
new e15a16a7e6 NIFI-11963 Added null check in system test for instance
cache method
e15a16a7e6 is described below
commit e15a16a7e6bcc16cbc5170c5220acd4dcac05a57
Author: Robert Kalmar <[email protected]>
AuthorDate: Thu Aug 17 15:58:35 2023 +0200
NIFI-11963 Added null check in system test for instance cache method
- Timing issues in system integration tests could sometimes fail with a
NullPointerException when calling the poison method multiple times
This closes #7618
Signed-off-by: David Handermann <[email protected]>
(cherry picked from commit 25d775b9651dc5a69120e0bed7545daa18281f3d)
---
.../src/test/java/org/apache/nifi/tests/system/NiFiInstanceCache.java | 3 +++
1 file changed, 3 insertions(+)
diff --git
a/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/NiFiInstanceCache.java
b/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/NiFiInstanceCache.java
index 493fd9b60c..2d5bfa0324 100644
---
a/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/NiFiInstanceCache.java
+++
b/nifi-system-tests/nifi-system-test-suite/src/test/java/org/apache/nifi/tests/system/NiFiInstanceCache.java
@@ -103,6 +103,9 @@ public class NiFiInstanceCache {
}
public void poison(final NiFiInstance toPoison) {
+ if (this.instance == null) {
+ return;
+ }
final NiFiInstance rawInstance = this.instance.getRawInstance();
if (Objects.equals(rawInstance, toPoison)) {