Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed bug in sauce-tunnel-delete.rb

Also: print out output of that command when called by Java
  • Loading branch information...
commit 6b31d841648e1c00da2b3cfdd2a3cf3d1b7eff5d 1 parent c2ce1bb
authored February 17, 2010
7  java/source_server/net/jsunit/SeleniumTest.java
@@ -72,6 +72,13 @@ private void startSauceTunnel() throws IOException {
72 72
     private void stopSauceTunnel() throws IOException {
73 73
         System.out.println("stopping tunnel");
74 74
         tunnel_process = Runtime.getRuntime().exec("ruby sauce-tunnel-delete.rb " + tunnel_id);
  75
+        String line;
  76
+        BufferedReader input = new BufferedReader
  77
+                        (new InputStreamReader(tunnel_process.getInputStream()));
  78
+
  79
+        while ((line = input.readLine()) != null) {
  80
+            System.out.println(line);
  81
+        }
75 82
     }
76 83
 
77 84
     public void testStandaloneRun() throws Exception {
6  sauce-tunnel-delete.rb
@@ -14,12 +14,12 @@
14 14
 end
15 15
 
16 16
 def connect_to_rest_api
17  
-  sauce_api_url = "https://#{@selenium_config['username']}:#{@selenium_config['access-key']}@saucelabs.com/rest/#{@selenium_config['username']}/"
18  
-  # puts "[saucelabs-adapter] Connecting to Sauce API at #{sauce_api_url}"
  17
+  sauce_api_url = "https://#{@selenium_config.saucelabs_username}:#{@selenium_config.saucelabs_access_key}@saucelabs.com/rest/#{@selenium_config.saucelabs_username}/"
19 18
   @sauce_api_endpoint = SauceREST::Client.new sauce_api_url
20 19
 end
21 20
 
22  
-@selenium_config = SeleniumConfig.new('saucelabs', '../selenium.yml', 8080)
  21
+puts "[sauce-tunnel] Stopping tunnel #{@tunnel_id}"
  22
+@selenium_config = SaucelabsAdapter::SeleniumConfig.new('saucelabs', '../selenium.yml')
23 23
 connect_to_rest_api
24 24
 @sauce_api_endpoint.delete :tunnel, @tunnel_id
25 25
 

0 notes on commit 6b31d84

Please sign in to comment.
Something went wrong with that request. Please try again.