Skip to content

Commit 1c77ee6

Browse files
authored
E2E test: connections and reticulate flake fixes (#10802)
A couple flake fixes ### QA Notes @:connections @:reticulate
1 parent 5c5eea7 commit 1c77ee6

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

test/e2e/pages/sessions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -874,10 +874,10 @@ export class Sessions {
874874
*
875875
* @param version - The descriptive string of the runtime to verify.
876876
*/
877-
async expectSessionPickerToBe(runtimeName: string) {
877+
async expectSessionPickerToBe(runtimeName: string, timeout: number = 15000) {
878878
await test.step(`Verify runtime is selected: ${runtimeName}`, async () => {
879879
const normalizedRuntimeName = runtimeName.replace(/-\s\d+$/, '').trim();
880-
await expect(this.sessionPicker).toHaveText(normalizedRuntimeName);
880+
await expect(this.sessionPicker).toHaveText(normalizedRuntimeName, { timeout });
881881
}
882882
);
883883
}

test/e2e/tests/connections/connections-duckdb.test.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,40 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import { test, tags } from '../_test.setup';
7+
import fs from 'node:fs';
8+
import os from 'node:os';
9+
import path from 'node:path';
710

811
test.use({
912
suiteId: __filename
1013
});
1114

1215
const randomText = Math.random().toString(36).substring(7);
1316

17+
function configurePasswordStore() {
18+
const home = os.homedir(); // likely /root in your container
19+
// Adjust folder name to your product; for VS Code it's ".vscode"
20+
const argvDir = path.join(home, '.vscode-oss-dev');
21+
fs.mkdirSync(argvDir, { recursive: true });
22+
23+
const argvPath = path.join(argvDir, 'argv.json');
24+
const argv = {
25+
// use basic Chromium text encryption – fine for throwaway CI machines
26+
'password-store': 'basic'
27+
};
28+
29+
fs.writeFileSync(argvPath, JSON.stringify(argv, null, 2));
30+
}
31+
32+
1433
test.describe('DuckDB Connection', {
1534
tag: [tags.WEB, tags.CONNECTIONS, tags.WIN, tags.SOFT_FAIL]
1635
}, () => {
1736

37+
test.beforeAll(async function ({ app }) {
38+
configurePasswordStore();
39+
});
40+
1841
test('Python - Can establish a DuckDB connection', async function ({ python, app }) {
1942

2043
await app.workbench.console.pasteCodeToConsole(connectionCode, true);

test/e2e/tests/reticulate/reticulate-restart.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ test.describe('Reticulate', {
3838

3939
await sessions.start('pythonReticulate');
4040

41-
await app.workbench.sessions.expectSessionPickerToBe('Python (reticulate)');
41+
await app.workbench.sessions.expectSessionPickerToBe('Python (reticulate)', 60000);
4242

4343
await app.workbench.sessions.restart('Python (reticulate)', { waitForIdle: false });
4444

0 commit comments

Comments
 (0)