GrantPSpencer opened a new pull request, #2704: URL: https://github.com/apache/helix/pull/2704
### Issues #2700 [Failed CI Test] testUserDefinedCallback ### Description afterTest cleanup method assumes that callbackProperty has already been instantiated and is not null. Tests are run sequentially but the order is not guaranteed unless specifically set, so we can't assume the property is not null. Added null check and also renamed the method for clarity ### Tests - [ ] The following tests are written for this issue: N/A - The following is the result of the "mvn test" command on the appropriate module: You can reproduce this issue by running the test method on its own using the master branch: $ mvn test -Dtest=TestCloudEventCallbackProperty#testUserDefinedCallback -pl=helix-core ``` [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running org.apache.helix.cloud.event.TestCloudEventCallbackProperty [ERROR] Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.493 s <<< FAILURE! - in org.apache.helix.cloud.event.TestCloudEventCallbackProperty [ERROR] testUserDefinedCallback(org.apache.helix.cloud.event.TestCloudEventCallbackProperty) Time elapsed: 0.01 s <<< FAILURE! java.lang.NullPointerException at org.apache.helix.cloud.event.TestCloudEventCallbackProperty.afterTest(TestCloudEventCallbackProperty.java:64) at org.apache.helix.cloud.event.TestCloudEventCallbackProperty.testUserDefinedCallback(TestCloudEventCallbackProperty.java:137) [ERROR] afterTest(org.apache.helix.cloud.event.TestCloudEventCallbackProperty) Time elapsed: 0.01 s <<< FAILURE! java.lang.NullPointerException at org.apache.helix.cloud.event.TestCloudEventCallbackProperty.afterTest(TestCloudEventCallbackProperty.java:64) ``` After the change: $ mvn test -Dtest=TestCloudEventCallbackProperty#testUserDefinedCallback -pl=helix-core ``` [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running org.apache.helix.cloud.event.TestCloudEventCallbackProperty Using handler: org.apache.helix.cloud.event.CloudEventHandler [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.505 s - in org.apache.helix.cloud.event.TestCloudEventCallbackProperty [INFO] [INFO] Results: [INFO] [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] [INFO] --- jacoco:0.8.6:report (generate-code-coverage-report) @ helix-core --- [INFO] Loading execution data file /Users/gspencer/Desktop/git-repos/helix/helix-core/target/jacoco.exec [INFO] Analyzed bundle 'Apache Helix :: Core' with 802 classes [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS ``` -- 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]
