Skip to content

Commit 7d17785

Browse files
committed
added lsof pid
1 parent f24b29f commit 7d17785

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

lib/browserstack/local.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,13 @@ def isRunning
9393

9494
def stop
9595
return if @pid.nil?
96+
puts "PID #{@pid}"
97+
puts `lsof -i:45691`
9698
Process.kill("INT", @pid)
9799
sleep 3
98100
Process.kill("KILL", @pid)
99101
@process.close
102+
puts `lsof -i:45691`
100103
while self.isRunning
101104
sleep 1
102105
end

test/browserstack-local-test.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ def setup
88
end
99

1010
def test_check_pid
11-
@bs_local.start({'force' => true})
11+
@bs_local.start
1212
refute_nil @bs_local.pid, 0
1313
end
1414

1515
def test_is_running
16-
@bs_local.start({'force' => true})
16+
@bs_local.start
1717
assert_equal true, @bs_local.isRunning
1818
end
1919

2020
def test_multiple_binary
21-
@bs_local.start({'force' => true})
21+
@bs_local.start
2222
bs_local_2 = BrowserStack::Local.new
2323
assert_raises BrowserStack::LocalException do
24-
bs_local_2.start({'force' => true})
24+
bs_local_2.start
2525
end
2626
end
2727

0 commit comments

Comments
 (0)