@wdio/local-runner 8.0.11 → 8.0.12
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.
- package/build/run.d.ts.map +1 -1
- package/build/run.js +9 -0
- package/build/worker.d.ts +1 -0
- package/build/worker.d.ts.map +1 -1
- package/build/worker.js +20 -1
- package/package.json +3 -3
package/build/run.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":";AAUA;;GAEG;AACH,UAAU,eAAgB,SAAQ,MAAM,CAAC,YAAY;IACjD,eAAe,EAAE,OAAO,CAAA;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACrB;
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":";AAUA;;GAEG;AACH,UAAU,eAAgB,SAAQ,MAAM,CAAC,YAAY;IACjD,eAAe,EAAE,OAAO,CAAA;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACrB;AAYD,eAAO,MAAM,MAAM,iBAA6C,CAAA;AA8BhE;;GAEG;AACH,eAAO,MAAM,UAAU,aAAc,MAAM,IAAI,SAQ9C,CAAA"}
|
package/build/run.js
CHANGED
|
@@ -3,6 +3,15 @@ import Runner from '@wdio/runner';
|
|
|
3
3
|
import logger from '@wdio/logger';
|
|
4
4
|
import { SHUTDOWN_TIMEOUT } from './constants.js';
|
|
5
5
|
const log = logger('@wdio/local-runner');
|
|
6
|
+
/**
|
|
7
|
+
* send ready event to testrunner to start receive command messages
|
|
8
|
+
*/
|
|
9
|
+
if (typeof process.send === 'function') {
|
|
10
|
+
process.send({
|
|
11
|
+
name: 'ready',
|
|
12
|
+
origin: 'worker'
|
|
13
|
+
});
|
|
14
|
+
}
|
|
6
15
|
export const runner = new Runner();
|
|
7
16
|
runner.on('exit', process.exit.bind(process));
|
|
8
17
|
runner.on('error', ({ name, message, stack }) => process.send({
|
package/build/worker.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export default class WorkerInstance extends EventEmitter implements Workers.Work
|
|
|
29
29
|
}>;
|
|
30
30
|
isMultiremote?: boolean;
|
|
31
31
|
isBusy: boolean;
|
|
32
|
+
isReady: boolean;
|
|
32
33
|
/**
|
|
33
34
|
* assigns paramters to scope of instance
|
|
34
35
|
* @param {object} config parsed configuration object
|
package/build/worker.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../src/worker.ts"],"names":[],"mappings":";;AAEA,OAAO,KAAK,MAAM,oBAAoB,CAAA;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAkBjE;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,YAAa,YAAW,OAAO,CAAC,MAAM;IAC9E,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,OAAO,CAAC,UAAU,CAAA;IAC1B,UAAU,EAAE,MAAM,CAAA;IAElB,IAAI,EAAE,YAAY,CAAC,gBAAgB,CAAA;IAEnC,YAAY,EAAE,YAAY,CAAC,gBAAgB,CAAA;IAC3C,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,oBAAoB,CAAA;IAC5B,MAAM,EAAE,oBAAoB,CAAA;IAC5B,YAAY,CAAC,EAAE,YAAY,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EA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KAAE,CAAC,CAAA;IACjD,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB,MAAM,UAAQ;IACd,OAAO,UAAQ;IAEf;;;;;;;;;OASG;gBAEC,MAAM,EAAE,OAAO,CAAC,UAAU,EAC1B,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,OAAO,CAAC,gBAAgB,EAC7E,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,oBAAoB;IAehC;;OAEG;IACH,YAAY;IAuDZ,OAAO,CAAC,cAAc;IAoDtB,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,WAAW;IAiBnB;;;;OAIG;IACH,WAAW,CAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,iBAAiB,GAAG,IAAI;CA8BvE"}
|
package/build/worker.js
CHANGED
|
@@ -38,6 +38,7 @@ export default class WorkerInstance extends EventEmitter {
|
|
|
38
38
|
instances;
|
|
39
39
|
isMultiremote;
|
|
40
40
|
isBusy = false;
|
|
41
|
+
isReady = false;
|
|
41
42
|
/**
|
|
42
43
|
* assigns paramters to scope of instance
|
|
43
44
|
* @param {object} config parsed configuration object
|
|
@@ -117,6 +118,12 @@ export default class WorkerInstance extends EventEmitter {
|
|
|
117
118
|
if (payload.name === 'finishedCommand') {
|
|
118
119
|
this.isBusy = false;
|
|
119
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* mark worker process as ready to receive events
|
|
123
|
+
*/
|
|
124
|
+
if (payload.name === 'ready') {
|
|
125
|
+
this.isReady = true;
|
|
126
|
+
}
|
|
120
127
|
/**
|
|
121
128
|
* store sessionId and connection data to worker instance
|
|
122
129
|
*/
|
|
@@ -179,7 +186,19 @@ export default class WorkerInstance extends EventEmitter {
|
|
|
179
186
|
this.childProcess = this.startProcess();
|
|
180
187
|
}
|
|
181
188
|
const cmd = { cid, command, configFile, args, caps: capabilities, specs, retries };
|
|
182
|
-
this.
|
|
189
|
+
if (!this.isReady) {
|
|
190
|
+
log.debug(`Worker with cid "${cid}" not ready yet to receive messages`);
|
|
191
|
+
this.on('message', (payload) => {
|
|
192
|
+
if (payload.name === 'ready') {
|
|
193
|
+
log.debug(`Worker with cid "${cid}" now ready, sending ${command}`);
|
|
194
|
+
this.childProcess.send(cmd);
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
log.debug(`Send command ${command} to worker with cid "${cid}"`);
|
|
200
|
+
this.childProcess.send(cmd);
|
|
201
|
+
}
|
|
183
202
|
this.isBusy = true;
|
|
184
203
|
}
|
|
185
204
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/local-runner",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.12",
|
|
4
4
|
"description": "A WebdriverIO runner to run tests locally",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-local-runner",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@types/stream-buffers": "^3.0.4",
|
|
31
31
|
"@wdio/logger": "8.0.0",
|
|
32
32
|
"@wdio/repl": "8.0.0",
|
|
33
|
-
"@wdio/runner": "8.0.
|
|
33
|
+
"@wdio/runner": "8.0.12",
|
|
34
34
|
"@wdio/types": "8.0.11",
|
|
35
35
|
"async-exit-hook": "^2.0.1",
|
|
36
36
|
"split2": "^4.1.0",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "2d97efe9eb605cb1858792e2ff8309f5ca77c60a"
|
|
43
43
|
}
|