Skip to content

Commit

Permalink
Increase timeout for E2E tests (#11516)
Browse files Browse the repository at this point in the history
  • Loading branch information
michelleangela authored Oct 9, 2023
1 parent cd8ecf9 commit 51d88db
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ suite("[Inlay hints test]", function(): void {
if (result.filename === "inlay_hints.cpp" && result.status === apit.Status.IntelliSenseReady) {
console.log(`IntelliSense for '${result.filename}' is ready`);
resolve();
} else if (result.status === apit.Status.TagParsingBegun) {
console.log(`IntelliSense status is TagParsingBegun`);
} else if (result.status === apit.Status.TagParsingDone) {
console.log(`IntelliSense status is TagParsingDone`);
} else if (result.status === apit.Status.IntelliSenseCompiling) {
console.log(`IntelliSense status is IntelliSenseCompiling`);
}
}));
});
Expand All @@ -63,7 +69,7 @@ suite("[Inlay hints test]", function(): void {
console.log("Open file: " + fileUri.toString());
const document: vscode.TextDocument = await vscode.workspace.openTextDocument(fileUri);
await vscode.window.showTextDocument(document);
await timeout(5000, getIntelliSenseStatus);
await timeout(30000, getIntelliSenseStatus);
saveOriginalSettings();
await useDefaultSettings();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,20 @@ suite("[Quick info test]", function(): void {
if (result.filename === "quickInfo.cpp" && result.status === apit.Status.IntelliSenseReady) {
console.log(`IntelliSense for '${result.filename}' is ready`);
resolve();
} else if (result.status === apit.Status.TagParsingBegun) {
console.log(`IntelliSense status is TagParsingBegun`);
} else if (result.status === apit.Status.TagParsingDone) {
console.log(`IntelliSense status is TagParsingDone`);
} else if (result.status === apit.Status.IntelliSenseCompiling) {
console.log(`IntelliSense status is IntelliSenseCompiling`);
}
}));
});

// Start language server
console.log("Open file: " + fileUri.toString());
await vscode.commands.executeCommand("vscode.open", fileUri);
await timeout(5000, getIntelliSenseStatus);
await timeout(20000, getIntelliSenseStatus);

});

Expand Down Expand Up @@ -85,7 +91,7 @@ suite("[Quick info test]", function(): void {
const expectedMap: Map<string, string> = new Map<string, string>();
expectedMap.set("win32", `\`\`\`cpp\nstd::string stringVar\n\`\`\``);
expectedMap.set("linux", `\`\`\`cpp\nstd::string stringVar\n\`\`\``);
expectedMap.set("darwin", `\`\`\`cpp\nstd::__cxx11::string stringVar\n\`\`\``);
expectedMap.set("darwin", `\`\`\`cpp\nstd::__1::string stringVar\n\`\`\``);

const expected: string = expectedMap.get(platform) ?? assert.fail("Platform not found");
const actual: string = (<vscode.MarkdownString>result[0].contents[0]).value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,20 @@ suite(`[Reference test]`, function(): void {
if (result.filename === "references.cpp" && result.status === apit.Status.IntelliSenseReady) {
console.log(`IntelliSense for '${result.filename}' is ready`);
resolve();
} else if (result.status === apit.Status.TagParsingBegun) {
console.log(`IntelliSense status is TagParsingBegun`);
} else if (result.status === apit.Status.TagParsingDone) {
console.log(`IntelliSense status is TagParsingDone`);
} else if (result.status === apit.Status.IntelliSenseCompiling) {
console.log(`IntelliSense status is IntelliSenseCompiling`);
}
}));
});
// Start language server
console.log("Open file: " + fileUri.toString());
document = await vscode.workspace.openTextDocument(fileUri);
await vscode.window.showTextDocument(document);
await timeout(5000, getIntelliSenseStatus);
await timeout(20000, getIntelliSenseStatus);
});

test("[Find confirmed references of a symbol]", async () => {
Expand Down

0 comments on commit 51d88db

Please sign in to comment.