Permalink
Browse files

Fixed bug in sauce-tunnel-delete.rb

Also: print out output of that command when called by Java
  • Loading branch information...
1 parent c2ce1bb commit 6b31d841648e1c00da2b3cfdd2a3cf3d1b7eff5d Sam Pierson committed Feb 17, 2010
Showing with 10 additions and 3 deletions.
  1. +7 −0 java/source_server/net/jsunit/SeleniumTest.java
  2. +3 −3 sauce-tunnel-delete.rb
@@ -72,6 +72,13 @@ private void startSauceTunnel() throws IOException {
private void stopSauceTunnel() throws IOException {
System.out.println("stopping tunnel");
tunnel_process = Runtime.getRuntime().exec("ruby sauce-tunnel-delete.rb " + tunnel_id);
+ String line;
+ BufferedReader input = new BufferedReader
+ (new InputStreamReader(tunnel_process.getInputStream()));
+
+ while ((line = input.readLine()) != null) {
+ System.out.println(line);
+ }
}
public void testStandaloneRun() throws Exception {
View
@@ -14,12 +14,12 @@
end
def connect_to_rest_api
- sauce_api_url = "https://#{@selenium_config['username']}:#{@selenium_config['access-key']}@saucelabs.com/rest/#{@selenium_config['username']}/"
- # puts "[saucelabs-adapter] Connecting to Sauce API at #{sauce_api_url}"
+ sauce_api_url = "https://#{@selenium_config.saucelabs_username}:#{@selenium_config.saucelabs_access_key}@saucelabs.com/rest/#{@selenium_config.saucelabs_username}/"
@sauce_api_endpoint = SauceREST::Client.new sauce_api_url
end
-@selenium_config = SeleniumConfig.new('saucelabs', '../selenium.yml', 8080)
+puts "[sauce-tunnel] Stopping tunnel #{@tunnel_id}"
+@selenium_config = SaucelabsAdapter::SeleniumConfig.new('saucelabs', '../selenium.yml')
connect_to_rest_api
@sauce_api_endpoint.delete :tunnel, @tunnel_id

0 comments on commit 6b31d84

Please sign in to comment.