changeset 1186:ec20c8c28a0e

Integration test: wait for service to exit Reviewed-by: jerboaa Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2013-July/007629.html
author Omair Majid <omajid@redhat.com>
date Fri, 26 Jul 2013 16:05:15 -0400
parents 169f039b133e
children ee1d0f51d9c0 40e2c7a18bda
files integration-tests/src/test/java/com/redhat/thermostat/itest/StorageTest.java
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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();
+
     }
 
 }