Skip to content

Commit

Permalink
test: wait for message from parent in embedding cctest
Browse files Browse the repository at this point in the history
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: #30467

Backport-PR-URL: #35241
PR-URL: #32563
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
addaleax committed Sep 23, 2020
1 parent cb635c2 commit 61eec0c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/cctest/test_environment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ TEST_F(EnvironmentTest, InspectorMultipleEmbeddedEnvironments) {

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

Expand Down

0 comments on commit 61eec0c

Please sign in to comment.