pivotal-selenium-rc 1.5.20090512 → 1.6.20090512
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +3 -0
- data/VERSION.yml +1 -1
- data/lib/selenium_rc/server.rb +3 -1
- data/spec/install_and_run_spec.rb +15 -11
- metadata +3 -2
data/CHANGES
ADDED
data/VERSION.yml
CHANGED
data/lib/selenium_rc/server.rb
CHANGED
@@ -10,21 +10,25 @@ describe "bin/selenium-rc" do
|
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
TCPSocket.wait_for_service_termination(:host => "0.0.0.0", :port => 4444)
|
16
|
-
end
|
17
|
-
|
18
|
-
it "starts the SeleniumRC server from the downloaded jar file" do
|
13
|
+
it "starts the SeleniumRC server from the downloaded jar file and terminates it when finished" do
|
14
|
+
thread = nil
|
19
15
|
Dir.chdir(root_dir) do
|
20
|
-
|
16
|
+
thread = Thread.start do
|
17
|
+
system("bin/selenium-rc") || raise("bin/selenium-server failed")
|
18
|
+
end
|
21
19
|
end
|
22
20
|
|
21
|
+
timeout {SeleniumRC::Server.service_is_running?}
|
22
|
+
thread.kill
|
23
|
+
timeout {!SeleniumRC::Server.service_is_running?}
|
24
|
+
end
|
25
|
+
|
26
|
+
def timeout
|
23
27
|
start_time = Time.now
|
24
|
-
|
25
|
-
until
|
26
|
-
if Time.now > (start_time +
|
27
|
-
raise SocketError.new("Socket did not open within #{
|
28
|
+
timeout_length = 15
|
29
|
+
until yield
|
30
|
+
if Time.now > (start_time + timeout_length)
|
31
|
+
raise SocketError.new("Socket did not open within #{timeout_length} seconds")
|
28
32
|
end
|
29
33
|
end
|
30
34
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pivotal-selenium-rc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.20090512
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pivotal Labs
|
@@ -12,7 +12,7 @@ autorequire:
|
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
14
|
|
15
|
-
date: 2009-05-
|
15
|
+
date: 2009-05-13 00:00:00 -07:00
|
16
16
|
default_executable: selenium-rc
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
@@ -34,6 +34,7 @@ extensions:
|
|
34
34
|
extra_rdoc_files:
|
35
35
|
- README.markdown
|
36
36
|
files:
|
37
|
+
- CHANGES
|
37
38
|
- README.markdown
|
38
39
|
- Rakefile
|
39
40
|
- VERSION.yml
|