Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to resolve some flaky tests #23716

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions test/browser/test_offset_converter.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ void magic_test_function(void) {
out(x);
fetch('http://localhost:8888?stdout=' + encodeURIComponent(x));
}
report('magic_test_function: input=' + $0);
var converted = wasmOffsetConverter.getName($0);
report('magic_test_function: converted=' + converted);
return converted == 'magic_test_function';
try {
report('magic_test_function: input=' + $0);
var converted = wasmOffsetConverter.getName($0);
report('magic_test_function: converted=' + converted);
return converted == 'magic_test_function';
} catch (e) {
report((e?.message ?? '(unknown message)') + ' ' + (e?.stack ?? '(unknown stack)'));
return false;
}
}, get_pc());
assert(result);
}
Expand Down
6 changes: 6 additions & 0 deletions test/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1201,6 +1201,12 @@ def setUp(self):
# Opt in to node v15 default behaviour:
# https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode
self.node_args.append('--unhandled-rejections=throw')
elif node_version >= (23, 0, 0):
# node version >= 23 warns negative timer value, which
# emscripten_set_timeout_loop() sometimes met it.
# TimeoutNegativeWarning is introduced with
# https://github.com/nodejs/node/pull/46678
self.node_args.append('--disable-warning=TimeoutNegativeWarning')

# If the version we are running tests in is lower than the version that
# emcc targets then we need to tell emcc to target that older version.
Expand Down