From a0ab7fbbc6f59bcd5cfbfdf60725e203c295df24 Mon Sep 17 00:00:00 2001 From: Koji Kawamura Date: Tue, 6 Jun 2017 11:08:08 +0900 Subject: [PATCH] NIFI-4021: Fix StandardFlowSynchronizerSpec to pass independently. --- .../controller/StandardFlowSynchronizerSpec.groovy | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/groovy/org/apache/nifi/controller/StandardFlowSynchronizerSpec.groovy b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/groovy/org/apache/nifi/controller/StandardFlowSynchronizerSpec.groovy index e54bbe8c0455..7483228e2bf6 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/groovy/org/apache/nifi/controller/StandardFlowSynchronizerSpec.groovy +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/groovy/org/apache/nifi/controller/StandardFlowSynchronizerSpec.groovy @@ -37,14 +37,16 @@ import spock.lang.Unroll class StandardFlowSynchronizerSpec extends Specification { @Shared - def systemBundle; + def systemBundle + @Shared + def nifiProperties def setupSpec() { def propFile = StandardFlowSynchronizerSpec.class.getResource("/standardflowsynchronizerspec.nifi.properties").getFile() - def niFiProperties = NiFiProperties.createBasicNiFiProperties(propFile, null); - systemBundle = SystemBundle.create(niFiProperties); - ExtensionManager.discoverExtensions(systemBundle, Collections.emptySet()); + nifiProperties = NiFiProperties.createBasicNiFiProperties(propFile, null) + systemBundle = SystemBundle.create(nifiProperties) + ExtensionManager.discoverExtensions(systemBundle, Collections.emptySet()) } def teardownSpec() { @@ -75,8 +77,7 @@ class StandardFlowSynchronizerSpec extends Specification { def Map connectionMocksById = [:] def Map> bendPointPositionsByConnectionId = [:] // the unit under test - def nifiProperties = NiFiProperties.createBasicNiFiProperties(null, null) - def flowSynchronizer = new StandardFlowSynchronizer(null,nifiProperties) + def flowSynchronizer = new StandardFlowSynchronizer(null, nifiProperties) def firstRootGroup = Mock ProcessGroup when: "the flow is synchronized with the current state of the controller"