Browse Source

Don't spin so fast in tests while waiting

tags/nilmrun-1.2.2^0
Jim Paris 10 years ago
parent
commit
5cd38f1ba9
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      tests/test_nilmrun.py

+ 2
- 0
tests/test_nilmrun.py View File

@@ -65,6 +65,7 @@ class TestClient(object):
status = client.get("process/status", { "pid": pid })
if status["alive"] == False:
break
time.sleep(0.1)
else:
raise AssertionError("process " + str(pid) + " didn't die in " +
str(timeout) + " seconds: " + repr(status))
@@ -248,6 +249,7 @@ class TestClient(object):
sys.stdout.flush()
if status["alive"] == False:
break
time.sleep(0.1)
status = client.post("process/remove", { "pid": pid })
os._exit(int(status["exitcode"]))



Loading…
Cancel
Save