You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by im...@apache.org on 2014/10/27 15:16:26 UTC
[22/50] [abbrv] git commit: Added asynctask test
Added asynctask test
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/b5b6fb3f
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/b5b6fb3f
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/b5b6fb3f
Branch: refs/heads/master
Commit: b5b6fb3fdebb53f4709ba8468c5e376f2ab989c1
Parents: 9982ae9
Author: Chamila de Alwis <ch...@wso2.com>
Authored: Mon Oct 20 14:03:36 2014 +0530
Committer: Chamila de Alwis <ch...@wso2.com>
Committed: Mon Oct 20 14:03:36 2014 +0530
----------------------------------------------------------------------
tools/python-cartridge-agent/test/asynctest.txt | 1 +
tools/python-cartridge-agent/test/test_util.py | 18 +++++++++++++++++-
2 files changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/b5b6fb3f/tools/python-cartridge-agent/test/asynctest.txt
----------------------------------------------------------------------
diff --git a/tools/python-cartridge-agent/test/asynctest.txt b/tools/python-cartridge-agent/test/asynctest.txt
new file mode 100644
index 0000000..ffae2e3
--- /dev/null
+++ b/tools/python-cartridge-agent/test/asynctest.txt
@@ -0,0 +1 @@
+1413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793
552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.293
61413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.2936141379
3552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29
361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.293614137
93552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.2
9361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413
793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.
29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.2936141
3793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552
.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.293614
13793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.2936141379355
2.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361
413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.293614137935
52.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.29361413793552.2936
1413793552.29361413793552.29361413793552.2936
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/stratos/blob/b5b6fb3f/tools/python-cartridge-agent/test/test_util.py
----------------------------------------------------------------------
diff --git a/tools/python-cartridge-agent/test/test_util.py b/tools/python-cartridge-agent/test/test_util.py
index 2439cf2..c7ee884 100644
--- a/tools/python-cartridge-agent/test/test_util.py
+++ b/tools/python-cartridge-agent/test/test_util.py
@@ -1,4 +1,20 @@
from cartridgeagent.modules.util.asyncscheduledtask import AsyncScheduledTask
+from threading import Thread
+import time
+
+def thread_worker():
+ f = open("asynctest.txt", "w")
+ f.write("%1.4f" % time.time() * 1000)
+ f.close()
def test_async_task():
- assert True
\ No newline at end of file
+ astask = AsyncScheduledTask(2, Thread(thread_worker()))
+ start_time = time.time() * 1000
+ astask.run()
+ time.sleep(3)
+ astask.terminate()
+ f = open("asynctest.txt")
+ end_time = float(f.read())
+ assert (end_time - start_time) >= 2 * 1000, "Task was executed before specified delay"
+
+