Skip to content

Commit

Permalink
added delay before while loop
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshwinThomasIBM authored and JoshwinThomasIBM committed Jan 23, 2025
1 parent b16c236 commit 1d85020
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
13 changes: 7 additions & 6 deletions src/test/MavenTestDevModeActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,17 +208,18 @@ it('Run tests for sample maven project with surefire version 3.4.0', async () =>

await utils.clearMavenPluginCache();
await utils.modifyPomFile();
await utils.launchDashboardAction(item, constants.START_DASHBOARD_ACTION_WITH_PARAM, constants.START_DASHBOARD_MAC_ACTION_WITH_PARAM);
await utils.launchDashboardAction(item, constants.START_DASHBOARD_ACTION_WITH_PARAM, constants.START_DASHBOARD_MAC_ACTION_WITH_PARAM);
const foundCommand = await utils.chooseCmdFromHistory("-DhotTests=true");
expect(foundCommand).to.be.true;
expect (foundCommand).to.be.true;
await utils.delay(30000);
const serverStartStatus = await utils.checkTerminalforServerState(constants.SERVER_START_STRING);
if (!serverStartStatus)
if(!serverStartStatus)
console.log("Server started with params message not found in the terminal ");
else {
else
{
console.log("Server succuessfully started");
await utils.launchDashboardAction(item, constants.STOP_DASHBOARD_ACTION, constants.STOP_DASHBOARD_MAC_ACTION);
const serverStopStatus = await utils.checkTerminalforServerState(constants.SERVER_STOP_STRING);
await utils.launchDashboardAction(item, constants.STOP_DASHBOARD_ACTION, constants.STOP_DASHBOARD_MAC_ACTION);
const serverStopStatus= await utils.checkTerminalforServerState(constants.SERVER_STOP_STRING);
await utils.revertPomFile();
await utils.clearMavenPluginCache();
if (!serverStopStatus) {
Expand Down
3 changes: 2 additions & 1 deletion src/test/utils/testUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ export function getMvnProjectPath(): string {
export async function checkTerminalforServerState(serverStatusCode : string ): Promise <Boolean> {
const workbench = new Workbench();
let foundText = false;
let count=0;
let count=0;
await delay(30000);
do{
VSBrowser.instance.takeScreenshot('before clean slate for clipboard for '+count);
clipboard.writeSync('');//clean slate for clipboard
Expand Down

0 comments on commit 1d85020

Please sign in to comment.