time.sleep(seconds) was executed on server not a client.
After changes client execute sleep and server wait
until client finish the job.

Signed-off-by: Rafal Mackowski <[email protected]>
---
 server/tests/sleeptest/control      |    2 +-
 server/tests/sleeptest/sleeptest.py |    5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/server/tests/sleeptest/control b/server/tests/sleeptest/control
index f417729..cb21907 100644
--- a/server/tests/sleeptest/control
+++ b/server/tests/sleeptest/control
@@ -12,6 +12,6 @@ runs sleep for one second on the list of machines.

 def run(machine):
     host = hosts.create_host(machine)
-    job.run_test('sleeptest')
+    job.run_test('sleeptest', host=host)

 job.parallel_simple(run, machines)
diff --git a/server/tests/sleeptest/sleeptest.py b/server/tests/sleeptest/sleeptest.py
index 4109439..56663b7 100644
--- a/server/tests/sleeptest/sleeptest.py
+++ b/server/tests/sleeptest/sleeptest.py
@@ -1,8 +1,7 @@
-import time
 from autotest.server import test

 class sleeptest(test.test):
     version = 1

-    def run_once(self, host=None, seconds=1):
-        time.sleep(seconds)
+    def execute(self, host, seconds=1):
+        host.run('sleep ' + str(seconds))
--
1.7.0.4

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to