Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix query editor smoke test race condition #6213

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/smoke/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ describe('Running Code', () => {
const allExtensionsLoadedText = 'All Extensions Loaded';
const setupTestCommand = 'Test: Setup Integration Test';
const waitForExtensionsCommand = 'Test: Wait For Extensions To Load';

await app.workbench.statusbar.waitForStatusbarText(testExtLoadedText, testExtLoadedText);
await app.workbench.quickopen.runCommand(setupTestCommand);
await app.workbench.statusbar.waitForStatusbarText(testSetupCompletedText, testSetupCompletedText);
Expand Down
3 changes: 2 additions & 1 deletion test/smoke/src/sql/queryEditor/queryEditor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ import * as path from 'path';

export function setup() {
describe('Query Editor Test Suite', () => {

it('Can open and edit existing file', async function () {
const testFilePath = path.join(os.tmpdir(), 'QueryEditorSmokeTest.sql');
fs.writeFileSync(testFilePath, '');
try {
const app = this.app as Application;
await app.workbench.queryEditors.openFile(testFilePath);
const fileBaseName = path.basename(testFilePath);
// The output window is sometimes taking focus from the query window so make sure we have focus before trying to type the text
await app.workbench.editor.waitForEditorFocus(fileBaseName, 1);
await app.workbench.editor.waitForTypeInEditor(fileBaseName, 'SELECT * FROM sys.tables');
}
finally {
Expand Down