run_loop 4.4.2 → 4.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/run_loop/device_agent/Frameworks.zip +0 -0
- data/lib/run_loop/device_agent/app/DeviceAgent-Runner.app.zip +0 -0
- data/lib/run_loop/device_agent/bin/iOSDeviceManager +0 -0
- data/lib/run_loop/device_agent/client.rb +23 -5
- data/lib/run_loop/device_agent/ipa/DeviceAgent-Runner.app.zip +0 -0
- data/lib/run_loop/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a5c25ee5ae80a0b35f8c35d252a3ecd2df9f2e739850f0d6bc9fed1603ab608
|
4
|
+
data.tar.gz: ae0646d4427e7ff39b681d5e2bb824b7000c2ce17dce6c702443c376b0bab5ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fead38a3a95ad67e7e34119043b02eccc3e933070a152fde186612da2e7028686304c9ef43bff17186c49d707df32c81ee659f54ef913f5896eb0e2d1e8d3d58
|
7
|
+
data.tar.gz: d58e00d207ccff3503d2fe2f1e2d1492c803c8e91630e6485d51de574807ca4f045e3da2c33d09175404c2053e694a6fec33de9fc3366661386f81b9348629fb
|
Binary file
|
Binary file
|
Binary file
|
@@ -57,7 +57,11 @@ module RunLoop
|
|
57
57
|
# using XCUIElement#typeText. It corresponds to the DeviceAgent
|
58
58
|
# constant CBX_DEFAULT_SEND_STRING_FREQUENCY which is 60. _Decrease_
|
59
59
|
# this value if you are timing out typing strings.
|
60
|
-
:characters_per_second => 12
|
60
|
+
:characters_per_second => 12,
|
61
|
+
|
62
|
+
# The number of attempts for relaunch DeviceAgent
|
63
|
+
# when health check is failed
|
64
|
+
:device_agent_launch_retries => 3
|
61
65
|
}
|
62
66
|
|
63
67
|
AUT_LAUNCHED_BY_RUN_LOOP_ARG = "LAUNCHED_BY_RUN_LOOP"
|
@@ -160,6 +164,8 @@ module RunLoop
|
|
160
164
|
DEFAULTS[:shutdown_device_agent_before_launch])
|
161
165
|
terminate_aut_before_test = options.fetch(:terminate_aut_before_test,
|
162
166
|
DEFAULTS[:terminate_aut_before_test])
|
167
|
+
device_agent_launch_retries = options.fetch(:device_agent_launch_retries,
|
168
|
+
DEFAULTS[:device_agent_launch_retries])
|
163
169
|
|
164
170
|
aut_args = options.fetch(:args, [])
|
165
171
|
aut_env = options.fetch(:env, {})
|
@@ -176,7 +182,8 @@ module RunLoop
|
|
176
182
|
terminate_aut_before_test: terminate_aut_before_test,
|
177
183
|
dylib_injection_details: dylib_injection_details,
|
178
184
|
aut_args: aut_args,
|
179
|
-
aut_env: aut_env
|
185
|
+
aut_env: aut_env,
|
186
|
+
device_agent_launch_retries: device_agent_launch_retries
|
180
187
|
}
|
181
188
|
|
182
189
|
xcuitest = RunLoop::DeviceAgent::Client.new(bundle_id, device,
|
@@ -291,6 +298,11 @@ INSTANCE METHODS
|
|
291
298
|
default = DEFAULTS[:device_agent_install_timeout]
|
292
299
|
@launcher_options[:device_agent_install_timeout] = default
|
293
300
|
end
|
301
|
+
|
302
|
+
if !@launcher_options[:device_agent_launch_retries]
|
303
|
+
default = DEFAULTS[:device_agent_launch_retries]
|
304
|
+
@launcher_options[:device_agent_launch_retries] = default
|
305
|
+
end
|
294
306
|
end
|
295
307
|
|
296
308
|
# @!visibility private
|
@@ -1471,10 +1483,11 @@ If the body empty, the DeviceAgent has probably crashed.
|
|
1471
1483
|
|
1472
1484
|
start = Time.now
|
1473
1485
|
RunLoop.log_debug("Waiting for DeviceAgent to launch...")
|
1474
|
-
|
1475
|
-
|
1486
|
+
|
1476
1487
|
begin
|
1477
|
-
|
1488
|
+
retries ||= 0
|
1489
|
+
@launcher_pid = cbx_launcher.launch(options)
|
1490
|
+
timeout = options[:device_agent_install_timeout] * 0.5
|
1478
1491
|
health_options = {
|
1479
1492
|
:timeout => timeout,
|
1480
1493
|
:interval => 0.1,
|
@@ -1482,6 +1495,11 @@ If the body empty, the DeviceAgent has probably crashed.
|
|
1482
1495
|
}
|
1483
1496
|
health(health_options)
|
1484
1497
|
rescue RunLoop::HTTP::Error => _
|
1498
|
+
retries += 1
|
1499
|
+
sleep(2.0)
|
1500
|
+
RunLoop.log_debug("Could not connect to DeviceAgent service on try #{retries + 1}; will retry")
|
1501
|
+
shutdown
|
1502
|
+
retry if (retries) <= options[:device_agent_launch_retries]
|
1485
1503
|
raise %Q[
|
1486
1504
|
|
1487
1505
|
Could not connect to the DeviceAgent service.
|
Binary file
|
data/lib/run_loop/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: run_loop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karl Krukow
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-11-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|