You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Mark Payne (Jira)" <ji...@apache.org> on 2022/05/19 15:57:00 UTC

[jira] [Created] (NIFI-10037) Improve System Tests Resilience when one test fails

Mark Payne created NIFI-10037:
---------------------------------

             Summary: Improve System Tests Resilience when one test fails
                 Key: NIFI-10037
                 URL: https://issues.apache.org/jira/browse/NIFI-10037
             Project: Apache NiFi
          Issue Type: Sub-task
            Reporter: Mark Payne
            Assignee: Mark Payne


When one system test fails, it can sometimes leave the NiFi instance in a bad state. The NiFiSystemIT then runs its tearDown() method, but with the instance in an unexpected state, the destroyFlow() method may fail. An example of this is if a node is offloaded in a system test but the offload never completes. As a result, destroyFlow() will fail.

In this case, the instance is left in a bad state. So the next test will fail. This will cause cascading failures because the NiFi instance is not in the expected state to begin with. This then makes it very difficult to understand what is happening.

We can improve this by updating the NiFiSystemIT class so that when destroyFlow() fails, we call cleanup(), which will shutdown the NiFi instance and destroy the environment, creating a fresh environment for the next test so that we know we're in a good state.

Also noticed an issue where test names can conflict in different classes. For example, OffloadIT and LoadBalanceIT both have a test named testOffload() and as a result, the names of the 'troubleshooting' directory collide and overwrite one another. We should include the Test Class Name in the name of the directory. This will also help in troubleshooting problems, as it makes it easier to identify which test failed.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)