Skip to content

Commit 9cc7a34

Browse files
committed
Skip second consecutive unregistration.
1 parent 8586f9a commit 9cc7a34

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

  • rascal-vscode-extension/src/test/vscode-suite

rascal-vscode-extension/src/test/vscode-suite/dsl.test.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ parameterizedDescribe(function (errorRecovery: boolean) {
5757
await sleep(Delays.normal);
5858
}
5959

60-
async function loadPico() {
60+
async function loadPico(unregisterFirst = true) {
6161
const repl = new RascalREPL(bench, driver);
6262
await repl.start();
6363
await repl.execute("import testing::lang::pico::LanguageServer;", false, Delays.extremelySlow);
@@ -68,7 +68,9 @@ parameterizedDescribe(function (errorRecovery: boolean) {
6868
// is fixed (race between `unregister` and `register`), the
6969
// unregistration can't reliably be done as part of `main` (tried in
7070
// commit `a955a05`). Instead, it's done here.
71-
await unloadPico(repl);
71+
if (unregisterFirst) {
72+
await unloadPico(repl);
73+
}
7274

7375
const replExecuteMain = repl.execute(`register(errorRecovery=${errorRecovery});`); // we don't wait yet, because we might miss pico loading window
7476
const ide = new IDEOperations(browser);
@@ -460,7 +462,9 @@ end
460462
const editor = await ide.openModule(TestWorkspace.picoFile);
461463
await setParametricLanguage(editor);
462464

463-
await loadPico();
465+
await loadPico(false);
466+
467+
// Dynamically registered capability
464468
await ide.hasSyntaxHighlighting(editor, Delays.slow);
465469
});
466470
});

0 commit comments

Comments
 (0)