Skip to content

Commit ae053e8

Browse files
wip. test checking
1 parent c9822dd commit ae053e8

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

packages/devextreme-cli/testing/nextjs-server.js

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@ module.exports = class NextJsServer {
2525
}
2626

2727
async start() {
28-
if(process.platform !== 'win32') {
29-
let pid;
30-
while(pid = getPidByPort(this.port)) {
31-
console.log(`-----NEXTJS SERVER-start() kill for port ${this.port} ---->`);
32-
killProcByPid(pid);
33-
}
34-
}
35-
3628
await new Promise((resolve) => setTimeout(resolve, 1000));
3729
console.log('----RUN START SERVER CMD------>');
3830
({ proc: this.proc } = await runCommand('npx', ['next', 'start', `-p ${this.port}`], {
@@ -55,11 +47,10 @@ module.exports = class NextJsServer {
5547
}
5648

5749
console.log(`-----NEXTJS SERVER-exec kill for port ${this.port} ---->`);
58-
try {
59-
execSync(`lsof -i :${this.port} -t | xargs kill -9`, { stdio: 'ignore' });
60-
} catch(e) {
61-
console.log(`NextJs server on port ${this.port} not found. It's OK`);
62-
this.proc = null;
50+
let pid;
51+
while(pid = getPidByPort(this.port)) {
52+
console.log(`-----NEXTJS SERVER-start() kill for port ${this.port} ---->`);
53+
killProcByPid(pid);
6354
}
6455
}
6556
};

0 commit comments

Comments
 (0)