summaryrefslogtreecommitdiff
path: root/test/test_examples_util.rb
diff options
context:
space:
mode:
authormguetlein <martin.guetlein@gmail.com>2011-02-10 15:50:25 +0100
committermguetlein <martin.guetlein@gmail.com>2011-02-10 15:50:25 +0100
commit7856b7f17ff65bebe078115d32325bef3e9cebdf (patch)
tree1fd6ee93b403c54a0f8adf9312190be55b3685c4 /test/test_examples_util.rb
parent8a8d4cf28ae8b946bc7048ba8b3a36026537ba81 (diff)
add waiting task for tests, add new ambit example
Diffstat (limited to 'test/test_examples_util.rb')
-rwxr-xr-xtest/test_examples_util.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/test_examples_util.rb b/test/test_examples_util.rb
index 51cf4cc..d596a9a 100755
--- a/test/test_examples_util.rb
+++ b/test/test_examples_util.rb
@@ -54,14 +54,14 @@ module ValidationExamples
#end
end
- def self.validation_post(uri, params, subjectid )
+ def self.validation_post(uri, params, subjectid, waiting_task=nil )
params[:subjectid] = subjectid if subjectid
if $test_case
$test_case.post uri,params
return wait($test_case.last_response.body)
else
- return OpenTox::RestClientWrapper.post(File.join(CONFIG[:services]["opentox-validation"],uri),params).to_s
+ return OpenTox::RestClientWrapper.post(File.join(CONFIG[:services]["opentox-validation"],uri),params,nil,waiting_task).to_s
end
end
@@ -292,9 +292,9 @@ module ValidationExamples
end
end
- def report
+ def report( waiting_task=nil )
#begin
- @report_uri = Util.validation_post '/report/'+report_type,{:validation_uris => @validation_uri}, @subjectid if @validation_uri
+ @report_uri = Util.validation_post '/report/'+report_type,{:validation_uris => @validation_uri},@subjectid,waiting_task if @validation_uri
Util.validation_get "/report/"+report_uri.split("/")[-2]+"/"+report_uri.split("/")[-1], @subjectid if @report_uri
#rescue => ex
#puts "could not create report: "+ex.message
@@ -303,9 +303,9 @@ module ValidationExamples
#end
end
- def validate
+ def validate( waiting_task=nil )
#begin
- @validation_uri = Util.validation_post '/'+validation_type, get_params, @subjectid
+ @validation_uri = Util.validation_post '/'+validation_type, get_params, @subjectid, waiting_task
#rescue => ex
#puts "could not validate: "+ex.message
#@validation_error = ex.message