Ray Milkey

STC stacktrace fixes

- Shut down openflow meta app before driver test,
  was causing port collision issues with openflow server

- Fixed NPE in Network config store

- reordered tests to insure proper sequencing

Change-Id: Ib39330153f543ee960b8631a0dc9246ee4251851
...@@ -173,9 +173,12 @@ public class DistributedNetworkConfigStore ...@@ -173,9 +173,12 @@ public class DistributedNetworkConfigStore
173 private void processExistingConfigs(ConfigFactory configFactory) { 173 private void processExistingConfigs(ConfigFactory configFactory) {
174 ImmutableSet.copyOf(configs.keySet()).forEach(k -> { 174 ImmutableSet.copyOf(configs.keySet()).forEach(k -> {
175 if (Objects.equals(configFactory.configClass().getName(), k.configClass)) { 175 if (Objects.equals(configFactory.configClass().getName(), k.configClass)) {
176 - JsonNode json = configs.remove(k).value(); 176 + Versioned<JsonNode> remove = configs.remove(k);
177 - configs.put(key(k.subject, configFactory.configKey()), json); 177 + if (remove != null) {
178 - log.debug("Set config pending: {}, {}", k.subject, k.configClass); 178 + JsonNode json = remove.value();
179 + configs.put(key(k.subject, configFactory.configKey()), json);
180 + log.debug("Set config pending: {}, {}", k.subject, k.configClass);
181 + }
179 } 182 }
180 }); 183 });
181 } 184 }
......
...@@ -27,6 +27,10 @@ ...@@ -27,6 +27,10 @@
27 <step name="DriversTest.CheckDefault" requires="^" 27 <step name="DriversTest.CheckDefault" requires="^"
28 exec="test '${defaultDriver}' != ''"/> 28 exec="test '${defaultDriver}' != ''"/>
29 29
30 + <!-- Deactivate openfow app - prevents spawning multiple controllers -->
31 + <step name="DriversTest.DeactivateOpenflowApp" requires="^"
32 + exec="onos ${OCI} onos:app deactivate org.onosproject.openflow"/>
33 +
30 <!-- Deactivate drivers app --> 34 <!-- Deactivate drivers app -->
31 <step name="DriversTest.DeactivateDriversApp" requires="^" 35 <step name="DriversTest.DeactivateDriversApp" requires="^"
32 exec="onos ${OCI} onos:app deactivate org.onosproject.drivers"/> 36 exec="onos ${OCI} onos:app deactivate org.onosproject.drivers"/>
...@@ -37,6 +41,10 @@ ...@@ -37,6 +41,10 @@
37 <step name="DriversTest.AfterDeactivateFindDefault" requires="^" 41 <step name="DriversTest.AfterDeactivateFindDefault" requires="^"
38 exec="onos-find-driver ${OC1} default defaultInactive" env="!"/> 42 exec="onos-find-driver ${OC1} default defaultInactive" env="!"/>
39 43
44 + <!-- Reactivate openflow apps -->
45 + <step name="DriversTest.ActivateOpenflowApp" requires="^"
46 + exec="onos ${OCI} onos:app activate org.onosproject.openflow"/>
47 +
40 <!-- Reactivate all drivers --> 48 <!-- Reactivate all drivers -->
41 <step name="DriversTest.ActivateDriversApp" requires="^" 49 <step name="DriversTest.ActivateDriversApp" requires="^"
42 exec="onos ${OCI} onos:app activate org.onosproject.drivers"/> 50 exec="onos ${OCI} onos:app activate org.onosproject.drivers"/>
......
...@@ -23,18 +23,18 @@ ...@@ -23,18 +23,18 @@
23 <import file="${ONOS_SCENARIOS}/net-smoke.xml"/> 23 <import file="${ONOS_SCENARIOS}/net-smoke.xml"/>
24 <dependency name="Net-Smoke" requires="Setup"/> 24 <dependency name="Net-Smoke" requires="Setup"/>
25 25
26 - <import file="${ONOS_SCENARIOS}/meta-apps-test.xml"/>
27 - <dependency name="Meta-App" requires="Setup,~Net-Smoke"/>
28 -
29 <import file="${ONOS_SCENARIOS}/archetypes.xml"/> 26 <import file="${ONOS_SCENARIOS}/archetypes.xml"/>
30 <dependency name="Archetypes" requires="Setup,~Net-Smoke"/> 27 <dependency name="Archetypes" requires="Setup,~Net-Smoke"/>
31 28
32 - <import file="${ONOS_SCENARIOS}/netcfg.xml"/>
33 - <dependency name="Netcfg" requires="Setup,~Meta-App"/>
34 -
35 <import file="${ONOS_SCENARIOS}/drivers-test.xml"/> 29 <import file="${ONOS_SCENARIOS}/drivers-test.xml"/>
36 <dependency name="Drivers-Test" requires="Setup,~Net-Smoke,~Archetypes"/> 30 <dependency name="Drivers-Test" requires="Setup,~Net-Smoke,~Archetypes"/>
37 31
32 + <import file="${ONOS_SCENARIOS}/meta-apps-test.xml"/>
33 + <dependency name="Meta-App" requires="Setup,~Net-Smoke,~Drivers-Test"/>
34 +
35 + <import file="${ONOS_SCENARIOS}/netcfg.xml"/>
36 + <dependency name="Netcfg" requires="Setup,~Meta-App"/>
37 +
38 <import file="${ONOS_SCENARIOS}/wrapup.xml"/> 38 <import file="${ONOS_SCENARIOS}/wrapup.xml"/>
39 <dependency name="Wrapup" requires="~Archetypes,~Setup,~Net-Smoke,~Drivers-Test,~Meta-App,~Netcfg"/> 39 <dependency name="Wrapup" requires="~Archetypes,~Setup,~Net-Smoke,~Drivers-Test,~Meta-App,~Netcfg"/>
40 </scenario> 40 </scenario>
......