1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -05:00

test: use unordered assertion for node worker test (#23288)

This ordering of events is important here, but it's very hard to get
right.

In the meantime to avoid flakes I'm adding an unordered assertion.
This commit is contained in:
Bartek Iwańczuk 2024-04-08 20:51:37 +01:00 committed by GitHub
parent 03b84197a0
commit b7d716e8a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -1,7 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
use test_util::itest; use test_util::itest;
use test_util::itest_flaky;
itest!(worker_error { itest!(worker_error {
args: "run -A workers/worker_error.ts", args: "run -A workers/worker_error.ts",
@ -127,7 +126,7 @@ itest!(node_worker_auto_exits {
exit_code: 0, exit_code: 0,
}); });
itest_flaky!(node_worker_message_port { itest!(node_worker_message_port {
args: "run --quiet --allow-read workers/node_worker_message_port.mjs", args: "run --quiet --allow-read workers/node_worker_message_port.mjs",
output: "workers/node_worker_message_port.mjs.out", output: "workers/node_worker_message_port.mjs.out",
exit_code: 0, exit_code: 0,

View file

@ -1,4 +1,6 @@
[UNORDERED_START]
worker port closed worker port closed
worker: Hello from worker on parentPort! worker: Hello from worker on parentPort!
mainPort: Hello from worker on workerPort! mainPort: Hello from worker on workerPort!
mainPort closed mainPort closed
[UNORDERED_END]