diff options
author | Christoph Helma <helma@in-silico.ch> | 2012-02-16 22:17:50 +0000 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2012-02-16 22:17:50 +0000 |
commit | 0600fdc62e7446caa75ffcff4d097338818e0df9 (patch) | |
tree | 0f0ccdc884e333004eddb6e4b1074b721ecaa552 /test | |
parent | 6cacf7bbc3545ed87e21d0ca5a19ab4300699fdc (diff) |
Task.wait_for_completion fixed
Diffstat (limited to 'test')
-rw-r--r-- | test/task.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/task.rb b/test/task.rb index 5828223..41316d1 100644 --- a/test/task.rb +++ b/test/task.rb @@ -2,7 +2,7 @@ require 'test/unit' $LOAD_PATH << File.join(File.dirname(__FILE__),'..','lib') require File.join File.dirname(__FILE__),'..','lib','opentox-client.rb' #require "./validate-owl.rb" -# + TASK_SERVICE_URI = "http://ot-dev.in-silico.ch/task" class TaskTest < Test::Unit::TestCase @@ -14,9 +14,12 @@ class TaskTest < Test::Unit::TestCase end def test_create_and_complete - task = OpenTox::Task.create TASK_SERVICE_URI + task = OpenTox::Task.create TASK_SERVICE_URI do + sleep 1 + "http://test.org" + end assert_equal "Running", task.hasStatus - task.completed "http://test.org" + task.wait_for_completion assert_equal "Completed", task.hasStatus assert_equal "http://test.org", task.resultURI end @@ -26,9 +29,6 @@ class TaskTest < Test::Unit::TestCase task = OpenTox::Task.all(TASK_SERVICE_URI).last assert_equal OpenTox::Task, task.class #validate_owl(task.uri) - #puts task.uri end -=begin -=end end |