Skip to content

Commit 6e1eeb6

Browse files
committed
Artificially fail tests to test reporting.
1 parent 8101fa1 commit 6e1eeb6

2 files changed

Lines changed: 8 additions & 26 deletions

File tree

.github/workflows/build.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
strategy:
5151
matrix:
5252
os: [ubicloud-standard-4, windows-latest, macos-latest]
53-
fail-fast: true
53+
fail-fast: false
5454
env:
5555
CODE_VERSION: "1.100.0"
5656
runs-on: ${{ matrix.os }}
@@ -96,7 +96,7 @@ jobs:
9696
DELAY_FACTOR: 10
9797
RASCAL_LSP_DEV_DEPLOY: true
9898
_JAVA_OPTIONS: '-Xmx5G'
99-
run: npx extest setup-and-run out/test/vscode-suite/*.test.js --storage uitests
99+
run: npx extest setup-and-run out/test/vscode-suite/dsl.test.js --storage uitests
100100

101101
- name: "UI test (mac)"
102102
shell: bash
@@ -106,7 +106,7 @@ jobs:
106106
DELAY_FACTOR: 15
107107
RASCAL_LSP_DEV_DEPLOY: true
108108
_JAVA_OPTIONS: '-Xmx5G'
109-
run: npx extest setup-and-run out/test/vscode-suite/*.test.js --storage uitests
109+
run: npx extest setup-and-run out/test/vscode-suite/dsl.test.js --storage uitests
110110

111111
- name: "UI test (ubuntu)"
112112
shell: bash
@@ -118,7 +118,7 @@ jobs:
118118
_JAVA_OPTIONS: '-Xmx5G' # we have 16gb of memory, make sure LSP, REPL & DSL-LSP can start
119119
run: |
120120
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 # workaround for issue with Ubuntu 24.04 https://github.com/redhat-developer/vscode-extension-tester/blob/main/KNOWN_ISSUES.md#openresources-not-working-with-apparmor-2404
121-
xvfb-run --auto-servernum --server-args='-screen 0 1920x1080x24' npx extest setup-and-run out/test/vscode-suite/*.test.js --storage uitests
121+
xvfb-run --auto-servernum --server-args='-screen 0 1920x1080x24' npx extest setup-and-run out/test/vscode-suite/dsl.test.js --storage uitests
122122
123123
- name: Upload Screenshots
124124
uses: actions/upload-artifact@v7

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

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import { expect } from 'chai';
3232
import * as fs from 'fs/promises';
3333
import { Suite } from 'mocha';
3434
import * as path from 'path/posix';
35+
import { fail } from 'assert';
3536

3637
function parameterizedDescribe(body: (this: Suite, errorRecovery: boolean) => void) {
3738
describe('DSL', function() { body.apply(this, [false]); });
@@ -103,28 +104,9 @@ parameterizedDescribe(function (errorRecovery: boolean) {
103104
await protectedFiles.restore();
104105
});
105106

106-
it("has highlighting and parse errors", async function () {
107-
await ignoreFails(new Workbench().getEditorView().closeAllEditors());
108-
const editor = await ide.openModule(TestWorkspace.picoFile);
109-
const isPicoLoading = ide.statusContains("Pico");
110-
// we might miss this event, but we wait for it to show up
111-
await ignoreFails(driver.wait(isPicoLoading, Delays.normal, "Pico parser generator should have started"));
112-
// now wait for the Pico parser generator to disappear
113-
await driver.wait(async () => !(await isPicoLoading()), Delays.verySlow, "Pico parser generator should have finished", 100);
114-
await ide.hasSyntaxHighlighting(editor, Delays.slow);
115-
console.log("We got syntax highlighting");
116-
try {
117-
await editor.setTextAtLine(10, "b := ;");
118-
await ide.hasErrorSquiggly(editor, Delays.slow);
119-
} catch (e) {
120-
console.log(`Failed to trigger parse error: ${e}`);
121-
if (e instanceof Error) {
122-
console.log(e.stack);
123-
}
124-
} finally {
125-
await ide.revertOpenChanges();
126-
}
127-
}).retries(2);
107+
it.only("has highlighting and parse errors", async function () {
108+
fail("Artificial failure");
109+
});
128110

129111
it("has highlighting and parse errors for second extension", async function () {
130112
const editor = await ide.openModule(TestWorkspace.picoNewFile);

0 commit comments

Comments
 (0)