Skip to content

Commit 1a8e9ee

Browse files
committed
test: wait for message from parent in embedding cctest
I’ve seen this fail a few times in CI, presumably because the inspector commmand did not reach the child thread in time. Explicitly waiting seems to solve that. Refs: nodejs#30467 PR-URL: nodejs#32563 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent a7ada43 commit 1a8e9ee

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

test/cctest/test_environment.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ TEST_F(EnvironmentTest, InspectorMultipleEmbeddedEnvironments) {
429429

430430
v8::Local<v8::Value> extracted_value = LoadEnvironment(
431431
environment,
432+
"while (!global.variableFromParent) {}\n"
432433
"return global.variableFromParent;",
433434
std::move(data->inspector_parent_handle)).ToLocalChecked();
434435

0 commit comments

Comments
 (0)