Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.3.0
-
None
Description
While merging NIFI-1061 joewitt and I noticed a strange test failure:
Running org.apache.nifi.controller.service.TestStandardControllerServiceProvider Tests run: 6, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.138 sec <<< FAILURE! - in org.apache.nifi.controller.service.TestStandardControllerServiceProvider testEnableReferencingServicesGraph(org.apache.nifi.controller.service.TestStandardControllerServiceProvider) Time elapsed: 0.013 sec <<< ERROR! java.lang.IllegalStateException: ServiceA[id=1] cannot be enabled because it is not valid: [] at org.apache.nifi.controller.service.StandardControllerServiceNode.verifyCanEnable(StandardControllerServiceNode.java:176) at org.apache.nifi.controller.service.StandardControllerServiceProvider.enableControllerService(StandardControllerServiceProvider.java:286) at org.apache.nifi.controller.service.StandardControllerServiceProvider.enableReferencingServices(StandardControllerServiceProvider.java:565) at org.apache.nifi.controller.service.StandardControllerServiceProvider.enableReferencingServices(StandardControllerServiceProvider.java:544) at org.apache.nifi.controller.service.TestStandardControllerServiceProvider.testEnableReferencingServicesGraph(TestStandardControllerServiceProvider.java:141)
At first it was attributed to a small clean up change on StandardProcessScheduler that went in with NIFI-1061. However the failure now is reproducible without the change to StandardProcessScheduler. In fact running the test in repeat mode also produces a variation of a failure seen above:
java.lang.IllegalStateException: ServiceA[id=2] cannot be enabled because it is not valid: 'Other Service' validated against 'ServiceB' is invalid because Controller Service ServiceB[id=4] is disabled at org.apache.nifi.controller.service.StandardControllerServiceNode.verifyCanEnable(StandardControllerServiceNode.java:194) at org.apache.nifi.controller.service.StandardControllerServiceProvider.enableReferencingServices(StandardControllerServiceProvider.java:557) at org.apache.nifi.controller.service.StandardControllerServiceProvider.enableReferencingServices(StandardControllerServiceProvider.java:544) at org.apache.nifi.controller.service.TestStandardControllerServiceProvider.testEnableReferencingServicesGraph(TestStandardControllerServiceProvider.java:156) at org.apache.nifi.controller.service.TestStandardControllerServiceProvider.foo(TestStandardControllerServiceProvider.java:119) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) . . .