diff options
author | mguetlein <martin.guetlein@gmail.com> | 2013-02-13 11:56:26 +0100 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2013-02-13 11:56:26 +0100 |
commit | afff398ac7bbce8e6807fee86a5e54bb243bc227 (patch) | |
tree | 97a043d9f2b85a08b31083e29c48f883acfd0e3a | |
parent | 1b503270c54691001ee3c888f36ed3c23bc211d4 (diff) |
add method for wait for task error test
-rw-r--r-- | webapp/test.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/webapp/test.rb b/webapp/test.rb new file mode 100644 index 0000000..236d7b2 --- /dev/null +++ b/webapp/test.rb @@ -0,0 +1,17 @@ +#for testing the error handling + +module OpenTox + class Application < Service + + post '/test/wait_for_error_in_task/?' do + task = OpenTox::Task.create($task[:uri],@subjectid,{ RDF::DC.description => "wait_for_error_in_task"}) do |task| + sleep 2 + uri = RestClientWrapper.post File.join($dataset[:uri],'test/error_in_task') + wait_for_task(uri) + end + response['Content-Type'] = 'text/uri-list' + halt 202,task.uri.to_s+"\n" + end + + end +end
\ No newline at end of file |