Skip to content

Commit

Permalink
NIFI-11963 Added null check in system test for instance cache method
Browse files Browse the repository at this point in the history
- Timing issues in system integration tests could sometimes fail with a NullPointerException when calling the poison method multiple times

This closes apache#7618

Signed-off-by: David Handermann <[email protected]>
  • Loading branch information
dam4rus authored and exceptionfactory committed Aug 22, 2023
1 parent 680acf8 commit 25d775b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ public NiFiInstanceFactory getFactory() {
}

public void poison(final NiFiInstance toPoison) {
if (this.instance == null) {
return;
}
final NiFiInstance rawInstance = this.instance.getRawInstance();

if (Objects.equals(rawInstance, toPoison)) {
Expand Down

0 comments on commit 25d775b

Please sign in to comment.