Skip to content

Commit

Permalink
FLEXY-4848: filx linter
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjeet-tw committed Oct 31, 2023
1 parent cb03265 commit c255420
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e_nightly.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Nightly E2E
name: Flex Plugins CLI - Nightly E2E
on:
schedule:
- cron: '0 4 * * *' # At 4:00 UTC (09:30 IST) every day
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { ElementHandle, Page } from 'puppeteer';

export abstract class Base {
protected static readonly DEFAULT_LOCATE_TIMEOUT = 300000;

protected static readonly DEFAULT_PAGE_LOAD_TIMEOUT = 300000;

protected readonly page: Page;
Expand Down
10 changes: 5 additions & 5 deletions packages/flex-plugin-e2e-tests/src/utils/spawn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,24 +120,24 @@ export const logResult = (result: SpawnResult): void => {
export const killChildProcess = async (
child: ChildProcessWithoutNullStreams | undefined,
os: string,
retry = 2
retry = 2,
): Promise<void> => {
if (!child) {
throw new Error('Could not kill child process, process does not exist');
}

if (os === 'win32') {
try {
if(retry !== 2){
if (retry !== 2) {
logger.error(`Checking current status of process ${child.pid}`);
await promisifiedSpawn('tasklist', ['/v', '/fi', `"PID eq ${child.pid}"`]);
}
await promisifiedSpawn('taskkill', ['/pid', `${child.pid}`, '/f', '/t']);
} catch(e) {
} catch (e) {
logger.error(`Error killing the process: ${e}}`);
if (retry > 0) {
logger.info("Retrying to kill the process");
killChildProcess(child, os, retry - 1);
logger.info('Retrying to kill the process');
await killChildProcess(child, os, retry - 1);
}
}
} else {
Expand Down

0 comments on commit c255420

Please sign in to comment.