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

Updated message in logs - for gradle test case after execution #360

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions src/test/GradleTestDevModeActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ it('attach debugger for gradle with custom parameter event', async () => {
}
}

await utils.stopLibertyserver();
await utils.stopLibertyserver(constants.GRADLE_PROJECT);
isServerRunning = !await utils.checkTerminalforServerState(constants.SERVER_STOP_STRING); //negate isServerRunning
if (!isServerRunning)
console.log("Server stopped successfully ");
Expand All @@ -209,7 +209,7 @@ it('attach debugger for gradle with custom parameter event', async () => {
} finally {
console.log("finally block: is server running - ", isServerRunning);
if (isServerRunning) {
utils.stopLibertyserver();
utils.stopLibertyserver(constants.GRADLE_PROJECT);
}
else
console.log("good to close test - Attach Debugger for start with custom parameter(-DdebugPort=7777) event");
Expand Down
4 changes: 2 additions & 2 deletions src/test/MavenTestDevModeActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ it('attach debugger for start with custom parameter event', async () => {
}
}

await utils.stopLibertyserver();
await utils.stopLibertyserver(constants.MAVEN_PROJECT);
isServerRunning = !await utils.checkTerminalforServerState(constants.SERVER_STOP_STRING); //negate isServerRunning
if (!isServerRunning)
console.log("Server stopped successfully ");
Expand All @@ -224,7 +224,7 @@ it('attach debugger for start with custom parameter event', async () => {
} finally {
console.log("finally block: is server running - ", isServerRunning);
if (isServerRunning) {
utils.stopLibertyserver();
utils.stopLibertyserver(constants.MAVEN_PROJECT);
}
else
console.log("good to close test - Attach Debugger for start with custom parameter(-DdebugPort=7777) event");
Expand Down
9 changes: 5 additions & 4 deletions src/test/utils/testUtils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path = require('path');
import { Workbench, InputBox, DefaultTreeItem, ModalDialog } from 'vscode-extension-tester';
import * as fs from 'fs';
import { MAVEN_PROJECT, STOP_DASHBOARD_MAC_ACTION } from '../definitions/constants';
import { STOP_DASHBOARD_MAC_ACTION } from '../definitions/constants';
import { MapContextMenuforMac } from './macUtils';
import clipboard = require('clipboardy');
import { expect } from 'chai';
Expand Down Expand Up @@ -168,13 +168,13 @@ export function getMvnProjectPath(): string {

/* Stop Server Liberty dashboard post Attach Debugger*/
/* As the Window view changes using command to stop server instead of devmode action */
export async function stopLibertyserver() {
console.log("Stop Server action for MAVEN_PROJECT : " + MAVEN_PROJECT);
export async function stopLibertyserver(projectName: string) {
console.log("Stop Server action for Project : " + projectName);
const workbench = new Workbench();
await workbench.executeCommand(STOP_DASHBOARD_MAC_ACTION);
const input = InputBox.create();
(await input).clear();
(await input).setText(MAVEN_PROJECT);
(await input).setText(projectName);
(await input).confirm();
(await input).click();
await delay(10000);
Expand All @@ -192,4 +192,5 @@ export async function clearCommandPalette() {
expect(buttons.length).equals(2);
await dialog.pushButton('Clear');
}


Loading