This is an automated email from the ASF dual-hosted git repository. zstan pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite-nodejs-thin-client.git
commit 0c7c3c76688d34065253713c917b0d388b36ad83 Author: Igor Sapego <[email protected]> AuthorDate: Tue Jul 5 11:06:52 2022 +0400 IGNITE-17389 Increase test node startup timeout --- README.md | 2 ++ package.json | 2 +- spec/TestingHelper.js | 10 ++++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 13d2cc0..5cf5d1f 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,8 @@ This way is more suitable for developers or if you install client from zip archi ```bash cd nodejs-thin-client +npm install +npm run build npm link npm link apache-ignite-client #linking examples (optional) ``` diff --git a/package.json b/package.json index 57082ea..f46876d 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "devDependencies": { "jasmine": "3.6.2", "jasmine-expect": "5.0.0", - "jasmine-reporters": "2.3.2", + "jasmine-reporters": "2.5.0", "ps-tree": "1.2.0", "process-exists": "4.0.0", "glob": "7.1.6", diff --git a/spec/TestingHelper.js b/spec/TestingHelper.js index 83b2c8c..7fa1c0d 100644 --- a/spec/TestingHelper.js +++ b/spec/TestingHelper.js @@ -297,7 +297,7 @@ class TestingHelper { while (!await cond()) { if (Date.now() - startTime > timeout) { - throw 'Failed to achive condition within timeout ' + timeout; + throw 'Failed to achieve condition within timeout ' + timeout; } await TestingHelper.sleep(100); @@ -348,7 +348,7 @@ class TestingHelper { throw 'Unexpected log file for node ' + idx; if (needLogging) { - if (logs.length != 1) + if (logs.length !== 1) throw 'Unexpected number of log files for node ' + idx + ': ' + logs.length; TestingHelper._logReaders.set(idx, new LogReader(logs[0])); @@ -386,16 +386,18 @@ class TestingHelper { } static killNode(proc) { + TestingHelper.logDebug('Killing Ignite process: ' + proc.pid); if (TestingHelper.isWindows()) { child_process.spawnSync('taskkill', ['/F', '/T', '/PID', proc.pid.toString()]) } psTree(proc.pid, function (err, children) { children.map((p) => { + TestingHelper.logDebug('Killing Ignite process child: ' + p.PID); try { process.kill(p.PID, 'SIGKILL'); } catch (_error) { - // No-op. + TestingHelper.logDebug('Can not kill Ignite process child: ' + _error.toString()); } }); }); @@ -516,7 +518,7 @@ class TestingHelper { }); const started = await TestingHelper.waitForCondition(async () => - TestingHelper.tryConnectClient(idx), 10000); + TestingHelper.tryConnectClient(idx), 30000); if (!started) { await TestingHelper.killNodeAndWait(srv);
