Thomas Vachuska
Committed by Gerrit Code Review

FIxing a few glitches in STC and scenarios.

Change-Id: I55379c53392ad94e5c5d41b6ceb77d2382fa0d29
......@@ -23,7 +23,7 @@
exec="onos-check-apps ${OC1} drivers,openflow,proxyarp,fwd"/>
<step name="Ping-All-And-Verify" requires="Check-Apps"
exec="onos-mininet sendAndExpect py net.pingAll(1) --expect Results: .% dropped"/>
exec="onos-mininet sendAndExpect py net.pingAll(1) --expect 600/600 received"/>
<step name="Check-Summary-For-Hosts" requires="~Ping-All-And-Verify"
exec="onos-check-summary ${OC1} [0-9]* 25 140 25"/>
......
......@@ -34,14 +34,13 @@
<step name="Check-Summary" requires="Wait-For-Mininet"
exec="onos-check-summary ${OC1} [0-9]* 25 140 0"/>
<step name="Balance-Masters" requires="Check-Summary"
<step name="Balance-Masters" requires="~Check-Summary" if="${OC2}"
exec="onos ${OC1} balance-masters"/>
<step name="Pause-For-Masters" requires="Balance-Masters"
<step name="Pause-For-Masters" requires="Balance-Masters" if="${OC2}"
exec="sleep 10"/>
<step name="Check-Flows" requires="~Pause-For-Masters"
<step name="Check-Flows" requires="~Pause-For-Masters,~Check-Summary"
exec="onos-check-flows ${OC1}"/>
</group>
</scenario>
\ No newline at end of file
......
......@@ -157,7 +157,7 @@ class ScenarioStore {
cfg.getKeys().forEachRemaining(prop -> add(StepEvent.fromString(cfg.getString(prop))));
cfg.save();
} catch (ConfigurationException e) {
print("Unable to store file %s", storeFile);
print("Unable to load file %s", storeFile);
}
}
......
......@@ -108,7 +108,9 @@ public class StepEvent {
*/
public static StepEvent fromString(String string) {
String[] fields = string.split("~");
return new StepEvent(fields[0], parseLong(fields[1]), valueOf(fields[2]),
fields[3].equals("null") ? null : fields[3]);
return fields.length == 4 ?
new StepEvent(fields[0], parseLong(fields[1]), valueOf(fields[2]),
fields[3].equals("null") ? null : fields[3]) :
new StepEvent(fields[0], 0, Status.WAITING, null);
}
}
......
......@@ -74,7 +74,6 @@ class StepProcessor implements Runnable {
*/
private int execute() {
try (PrintWriter pw = new PrintWriter(logFile())) {
System.out.println("cmd: [" + command() + "]");
process = Runtime.getRuntime().exec(command());
processOutput(pw);
......