@@ -38,21 +38,23 @@ class Config
38
38
public const DEFAULT_SUITES = [];
39
39
public const DEFAULT_WAIT_UNTIL_READY = false ;
40
40
public const DEFAULT_WAIT_UNTIL_READY_TIMEOUT = 30 ;
41
+ public const DEFAULT_WAIT_UNTIL_READY_INTERVAL_MICROS = 50000 ;
41
42
42
43
public const DEFAULT_CONFIG = [
43
- 'listen ' => self ::DEFAULT_INTERFACE . ': ' . self ::DEFAULT_PORT ,
44
- 'debug ' => self ::DEFAULT_DEBUG_MODE ,
45
- 'start_delay ' => self ::DEFAULT_DELAY ,
46
- 'bin_path ' => self ::DEFAULT_PHIREMOCK_PATH ,
47
- 'expectations_path ' => self ::DEFAULT_EXPECTATIONS_PATH ,
48
- 'server_factory ' => self ::DEFAULT_SERVER_FACTORY ,
49
- 'certificate ' => self ::DEFAULT_CERTIFICATE ,
50
- 'certificate_key ' => self ::DEFAULT_CERTIFICATE_KEY ,
51
- 'cert_passphrase ' => self ::DEFAULT_CERTIFICATE_PASSPHRASE ,
52
- 'extra_instances ' => self ::DEFAULT_EXTRA_INSTANCES ,
53
- 'suites ' => self ::DEFAULT_SUITES ,
54
- 'wait_until_ready ' => self ::DEFAULT_WAIT_UNTIL_READY ,
55
- 'wait_until_ready_timeout ' => self ::DEFAULT_WAIT_UNTIL_READY_TIMEOUT
44
+ 'listen ' => self ::DEFAULT_INTERFACE . ': ' . self ::DEFAULT_PORT ,
45
+ 'debug ' => self ::DEFAULT_DEBUG_MODE ,
46
+ 'start_delay ' => self ::DEFAULT_DELAY ,
47
+ 'bin_path ' => self ::DEFAULT_PHIREMOCK_PATH ,
48
+ 'expectations_path ' => self ::DEFAULT_EXPECTATIONS_PATH ,
49
+ 'server_factory ' => self ::DEFAULT_SERVER_FACTORY ,
50
+ 'certificate ' => self ::DEFAULT_CERTIFICATE ,
51
+ 'certificate_key ' => self ::DEFAULT_CERTIFICATE_KEY ,
52
+ 'cert_passphrase ' => self ::DEFAULT_CERTIFICATE_PASSPHRASE ,
53
+ 'extra_instances ' => self ::DEFAULT_EXTRA_INSTANCES ,
54
+ 'suites ' => self ::DEFAULT_SUITES ,
55
+ 'wait_until_ready ' => self ::DEFAULT_WAIT_UNTIL_READY ,
56
+ 'wait_until_ready_timeout ' => self ::DEFAULT_WAIT_UNTIL_READY_TIMEOUT ,
57
+ 'wait_until_ready_interval ' => self ::DEFAULT_WAIT_UNTIL_READY_INTERVAL_MICROS ,
56
58
];
57
59
58
60
/** @var string */
@@ -87,6 +89,8 @@ class Config
87
89
private $ waitUntilReady ;
88
90
/** @var int */
89
91
private $ waitUntilReadyTimeout ;
92
+ /** @var int */
93
+ private $ waitUntilReadyCheckIntervalMicros ;
90
94
91
95
/** @throws ConfigurationException */
92
96
public function __construct (array $ config , callable $ output )
@@ -106,6 +110,7 @@ public function __construct(array $config, callable $output)
106
110
$ this ->suites = $ config ['suites ' ];
107
111
$ this ->waitUntilReady = (bool ) $ config ['wait_until_ready ' ];
108
112
$ this ->waitUntilReadyTimeout = (int ) $ config ['wait_until_ready_timeout ' ];
113
+ $ this ->waitUntilReadyCheckIntervalMicros = (int ) $ config ['wait_until_ready_interval ' ];
109
114
}
110
115
111
116
public function getSuites (): array
@@ -184,7 +189,7 @@ public function isSecure(): bool
184
189
&& $ this ->getCertificateKeyPath () !== null ;
185
190
}
186
191
187
- public function isWaitUntilReady (): bool
192
+ public function waitUntilReady (): bool
188
193
{
189
194
return $ this ->waitUntilReady ;
190
195
}
@@ -194,6 +199,11 @@ public function getWaitUntilReadyTimeout(): int
194
199
return $ this ->waitUntilReadyTimeout ;
195
200
}
196
201
202
+ public function getWaitUntilReadyIntervalMicros (): int
203
+ {
204
+ return $ this ->waitUntilReadyCheckIntervalMicros ;
205
+ }
206
+
197
207
/** @throws ConfigurationException */
198
208
public static function getDefaultLogsPath (): string
199
209
{
0 commit comments