Skip to content

Commit cb042d6

Browse files
authored
Attempt to make macOS CI more robust (#2310)
Just tuned / cleaned up the sleeps for our custom spoken forms tests. Mac tests passed 3 times in a row, which seems unlikely by chance given current unreliability, so I'd be tempted to ship it. Tempted to mock filesystem to make it faster / more robust, but that's work, and gives us slightly less confidence ## Checklist - [-] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [-] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [-] I have not broken the cheatsheet
1 parent a02b6a6 commit cb042d6

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

packages/cursorless-vscode-e2e/src/suite/scopeProvider/assertCalledWithScopeInfo.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export async function assertCalledWithScopeInfo<T extends ScopeTypeInfo>(
88
fake: sinon.SinonSpy<[scopeInfos: T[]], void>,
99
...expectedScopeInfos: T[]
1010
) {
11-
await sleepWithBackoff(25);
11+
await sleepWithBackoff(100);
1212
sinon.assert.called(fake);
1313

1414
for (const expectedScopeInfo of expectedScopeInfos) {
@@ -26,7 +26,7 @@ export async function assertCalledWithoutScopeInfo<T extends ScopeTypeInfo>(
2626
fake: sinon.SinonSpy<[scopeInfos: T[]], void>,
2727
...scopeTypes: ScopeType[]
2828
) {
29-
await sleepWithBackoff(25);
29+
await sleepWithBackoff(100);
3030
sinon.assert.called(fake);
3131

3232
for (const scopeType of scopeTypes) {

packages/cursorless-vscode-e2e/src/suite/scopeProvider/runCustomRegexScopeInfoTest.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { getCursorlessApi, openNewEditor } from "@cursorless/vscode-common";
88
import { stat, unlink, writeFile } from "fs/promises";
99
import * as sinon from "sinon";
1010
import { commands } from "vscode";
11-
import { sleepWithBackoff } from "../../endToEndTestSetup";
1211
import {
1312
assertCalledWithScopeInfo,
1413
assertCalledWithoutScopeInfo,
@@ -35,14 +34,12 @@ export async function runCustomRegexScopeInfoTest() {
3534
cursorlessTalonStateJsonPath,
3635
JSON.stringify(spokenFormJsonContents),
3736
);
38-
await sleepWithBackoff(50);
3937
await assertCalledWithScopeInfo(fake, unsupported);
4038

4139
await openNewEditor(contents);
4240
await assertCalledWithScopeInfo(fake, present);
4341

4442
await unlink(cursorlessTalonStateJsonPath);
45-
await sleepWithBackoff(100);
4643
await assertCalledWithoutScopeInfo(fake, scopeType);
4744
} finally {
4845
disposable.dispose();

packages/cursorless-vscode-e2e/src/suite/scopeProvider/runCustomSpokenFormScopeInfoTest.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { ScopeTypeInfo, sleep } from "@cursorless/common";
33
import * as sinon from "sinon";
44
import { assertCalledWithScopeInfo } from "./assertCalledWithScopeInfo";
55
import { stat, unlink, writeFile } from "fs/promises";
6-
import { sleepWithBackoff } from "../../endToEndTestSetup";
76

87
/**
98
* Tests that the scope provider correctly reports custom spoken forms
@@ -31,7 +30,6 @@ export async function runCustomSpokenFormScopeInfoTest() {
3130
cursorlessTalonStateJsonPath,
3231
JSON.stringify(spokenFormJsonContents),
3332
);
34-
await sleepWithBackoff(50);
3533
await assertCalledWithScopeInfo(
3634
fake,
3735
subjectCustom,
@@ -43,7 +41,6 @@ export async function runCustomSpokenFormScopeInfoTest() {
4341
);
4442

4543
await unlink(cursorlessTalonStateJsonPath);
46-
await sleepWithBackoff(100);
4744
await assertCalledWithScopeInfo(
4845
fake,
4946
roundStandard,

0 commit comments

Comments
 (0)