Skip to content

Commit c42f5b9

Browse files
committed
Fixes evaluator connection race by connecting before activation wait
Agent-Id: agent-3ae23ef3-fc89-4d68-affc-4abbb65e0dc2
1 parent 285da9f commit c42f5b9

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

scripts/e2e-dev-inspect.mjs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -463,18 +463,20 @@ async function main() {
463463
});
464464

465465
const page = await electronApp.firstWindow();
466-
console.log('Waiting for GitLens to activate...');
467-
await page.waitForTimeout(opts.activationWait);
468-
console.log('Ready.\n');
469466

470-
// Connect evaluator if requested
467+
// Connect evaluator early to avoid missing the VSCodeTestServer URL from stderr
468+
// (the URL is printed during launch, before activation completes)
471469
let evaluate = null;
472470
if (opts.withEvaluator) {
473471
const evaluator = await connectEvaluator(electronApp);
474472
evaluate = evaluator.evaluate.bind(evaluator);
475-
console.log('Evaluator bridge connected.\n');
473+
console.log('Evaluator bridge connected.');
476474
}
477475

476+
console.log('Waiting for GitLens to activate...');
477+
await page.waitForTimeout(opts.activationWait);
478+
console.log('Ready.\n');
479+
478480
// Execute actions in order
479481
for (const action of opts.actions) {
480482
switch (action.type) {

0 commit comments

Comments
 (0)