From 61eec0c6c70e00c69d3656d944feea199227f84b Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 30 Mar 2020 11:01:07 +0200 Subject: [PATCH] test: wait for message from parent in embedding cctest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: https://github.com/nodejs/node/pull/30467 Backport-PR-URL: https://github.com/nodejs/node/pull/35241 PR-URL: https://github.com/nodejs/node/pull/32563 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- test/cctest/test_environment.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/test/cctest/test_environment.cc b/test/cctest/test_environment.cc index b0603ce35734f3..88c1c2ab953608 100644 --- a/test/cctest/test_environment.cc +++ b/test/cctest/test_environment.cc @@ -406,6 +406,7 @@ TEST_F(EnvironmentTest, InspectorMultipleEmbeddedEnvironments) { v8::Local extracted_value = LoadEnvironment( environment, + "while (!global.variableFromParent) {}\n" "return global.variableFromParent;", std::move(data->inspector_parent_handle)).ToLocalChecked();