# HG changeset patch # User Omair Majid # Date 1374869115 14400 # Node ID ec20c8c28a0e15a69a511952c5b6d9a76fad7bd7 # Parent 169f039b133ee6df6090a4e07f821dbaf6f8ceef Integration test: wait for service to exit Reviewed-by: jerboaa Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2013-July/007629.html diff -r 169f039b133e -r ec20c8c28a0e integration-tests/src/test/java/com/redhat/thermostat/itest/StorageTest.java --- a/integration-tests/src/test/java/com/redhat/thermostat/itest/StorageTest.java Fri Jul 26 15:57:41 2013 -0400 +++ b/integration-tests/src/test/java/com/redhat/thermostat/itest/StorageTest.java Fri Jul 26 16:05:15 2013 -0400 @@ -75,15 +75,17 @@ public void testServiceStartAndKilling() throws Exception { SpawnResult spawnResult = spawnThermostatAndGetProcess("service"); - Spawn storage = spawnResult.spawn; + Spawn service = spawnResult.spawn; try { - storage.expectErr("agent started"); - } - finally { + service.expectErr("agent started"); + } finally { killRecursively(spawnResult.process); } + service.stop(); + service.expectClose(); + } }