mirror of https://github.com/apache/nifi.git
NIFI-9503: Fixed issue in system-tests
- Fixed system-tests workflow so that troubleshooting info is always uploaded for failures This closes #5614 Signed-off-by: David Handermann <exceptionfactory@apache.org>
This commit is contained in:
parent
66f36eaf5a
commit
20392d5ef4
|
@ -26,6 +26,7 @@ on:
|
|||
- 'nifi-framework-api/**'
|
||||
- 'nifi-nar-bundles/nifi-framework-bundle/**'
|
||||
- 'nifi-system-tests/**'
|
||||
- 'nifi-stateless/**'
|
||||
|
||||
env:
|
||||
DEFAULT_MAVEN_OPTS: >-
|
||||
|
@ -89,6 +90,7 @@ jobs:
|
|||
${{ env.MAVEN_RUN_ARGUMENTS }}
|
||||
${{ env.MAVEN_PROJECTS }}
|
||||
- name: Upload Troubleshooting Logs
|
||||
if: ${{ failure() }}
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ubuntu-latest-troubleshooting-logs
|
||||
|
@ -132,6 +134,7 @@ jobs:
|
|||
${{ env.MAVEN_RUN_ARGUMENTS }}
|
||||
${{ env.MAVEN_PROJECTS }}
|
||||
- name: Upload Troubleshooting Logs
|
||||
if: ${{ failure() }}
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: macos-latest-troubleshooting-logs
|
||||
|
|
|
@ -87,26 +87,27 @@ public class ControllerServiceApiValidationIT extends NiFiSystemIT {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testNonMatchingDynamicPropertyControllerService() throws NiFiClientException, IOException {
|
||||
final ControllerServiceEntity fakeServiceEntity = getClientUtil().createControllerService(
|
||||
public void testNonMatchingDynamicPropertyControllerService() throws NiFiClientException, IOException, InterruptedException {
|
||||
final ControllerServiceEntity controllerService = getClientUtil().createControllerService(
|
||||
NiFiSystemIT.TEST_CS_PACKAGE + ".FakeControllerService2",
|
||||
"root",
|
||||
NiFiSystemIT.NIFI_GROUP_ID,
|
||||
"nifi-system-test-extensions2-nar",
|
||||
getNiFiVersion());
|
||||
final ProcessorEntity fakeProcessorEntity = getClientUtil().createProcessor("FakeDynamicPropertiesProcessor");
|
||||
fakeProcessorEntity.getComponent().getConfig().setProperties(Collections.singletonMap("FCS.fakeControllerService", fakeServiceEntity.getId()));
|
||||
getNifiClient().getProcessorClient().updateProcessor(fakeProcessorEntity);
|
||||
|
||||
final ProcessorEntity processor = getClientUtil().createProcessor("FakeDynamicPropertiesProcessor");
|
||||
processor.getComponent().getConfig().setProperties(Collections.singletonMap("FCS.fakeControllerService", controllerService.getId()));
|
||||
getNifiClient().getProcessorClient().updateProcessor(processor);
|
||||
final ControllerServiceRunStatusEntity runStatusEntity = new ControllerServiceRunStatusEntity();
|
||||
runStatusEntity.setState("ENABLED");
|
||||
runStatusEntity.setRevision(fakeServiceEntity.getRevision());
|
||||
getNifiClient().getControllerServicesClient().activateControllerService(fakeServiceEntity.getId(), runStatusEntity);
|
||||
runStatusEntity.setRevision(controllerService.getRevision());
|
||||
getNifiClient().getControllerServicesClient().activateControllerService(controllerService.getId(), runStatusEntity);
|
||||
getClientUtil().waitForControllerSerivcesEnabled("root");
|
||||
String controllerStatus = getNifiClient().getControllerServicesClient().getControllerService(fakeServiceEntity.getId()).getStatus().getRunStatus();
|
||||
String processorStatus = getNifiClient().getProcessorClient().getProcessor(fakeProcessorEntity.getId()).getStatus().getRunStatus();
|
||||
|
||||
final String controllerStatus = getNifiClient().getControllerServicesClient().getControllerService(controllerService.getId()).getStatus().getRunStatus();
|
||||
assertEquals("ENABLED", controllerStatus);
|
||||
assertEquals("Invalid", processorStatus);
|
||||
|
||||
getClientUtil().waitForInvalidProcessor(processor.getId());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue