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

Get rid of non-working workaround to flakiness when Java LS server initialization failed #14945

Merged
merged 5 commits into from
Oct 22, 2019
Merged
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
15 changes: 2 additions & 13 deletions e2e/pageobjects/ide/Ide.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,19 +213,8 @@ export class Ide {

async checkLsInitializationStart(expectedTextInStatusBar: string) {
Logger.debug('Ide.checkLsInitializationStart');

try {
await this.waitStatusBarContains(expectedTextInStatusBar, 20000);
} catch (err) {
if (!(err instanceof error.TimeoutError)) {
throw err;
}

await this.driverHelper.getDriver().navigate().refresh();
await this.waitAndSwitchToIdeFrame();
await this.waitStatusBarContains(expectedTextInStatusBar);
}


await this.waitStatusBarContains(expectedTextInStatusBar, 20000);
}

async closeAllNotifications() {
Expand Down
14 changes: 13 additions & 1 deletion e2e/tests/e2e_happy_path/HappyPath.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,19 @@ suite('Language server validation', async () => {
test('Java LS initialization', async () => {
await projectTree.expandPathAndOpenFileInAssociatedWorkspace(pathToJavaFolder, javaFileName);
await editor.selectTab(javaFileName);
await ide.checkLsInitializationStart('Starting Java Language Server');

try {
await ide.checkLsInitializationStart('Starting Java Language Server');
} catch (err) {
if (!(err instanceof error.TimeoutError)) {
throw err;
}

console.log("Known flakiness has occurred https://github.com/eclipse/che/issues/14944");
await driverHelper.reloadPage();
await ide.waitStatusBarContains('Starting Java Language Server');
}

await ide.waitStatusBarTextAbsence('Starting Java Language Server', 1800000);
await checkJavaPathCompletion();
await ide.waitStatusBarTextAbsence('Building workspace', 360000);
Expand Down
6 changes: 3 additions & 3 deletions e2e/utils/DriverHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ export class DriverHelper {
}

public async reloadPage() {
Logger.trace('DriverHelper.reloadPage');
Logger.debug('DriverHelper.reloadPage');

await this.driver.navigate().refresh();
}
Expand All @@ -473,7 +473,7 @@ export class DriverHelper {
}

public async navigateToUrl(url: string) {
Logger.trace(`DriverHelper.navigateToUrl ${url}`);
Logger.debug(`DriverHelper.navigateToUrl ${url}`);

await this.driver.navigate().to(url);
}
Expand Down Expand Up @@ -534,7 +534,7 @@ export class DriverHelper {
}

async switchToSecondWindow(mainWindowHandle: string) {
Logger.trace('DriverHelper.switchToSecondWindow');
Logger.debug('DriverHelper.switchToSecondWindow');

await this.waitOpenningSecondWindow();
const handles: string[] = await this.driver.getAllWindowHandles();
Expand Down