From 4d15623a239af7b4b52a7c4769beffda78959c14 Mon Sep 17 00:00:00 2001 From: Jonatan Nilsson Date: Thu, 10 Mar 2022 12:24:57 +0000 Subject: [PATCH] Fix some test, update version --- package.json | 2 +- test/core.test.integration.mjs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 96fa71b..564ecd3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "service-core", - "version": "3.0.0-beta.3", + "version": "3.0.0-beta.4", "description": "Core boiler plate code to install node server as windows service", "main": "index.mjs", "scripts": { diff --git a/test/core.test.integration.mjs b/test/core.test.integration.mjs index 302baff..a77d635 100644 --- a/test/core.test.integration.mjs +++ b/test/core.test.integration.mjs @@ -189,6 +189,7 @@ runners.forEach(function([runnerName, appname]) { } integrationLog.on('newlog', function(record) { + allLogs.push(JSON.stringify(record)) if (turnDebuggingOn) { prettyPrintMessage(JSON.stringify(record)) } @@ -238,13 +239,14 @@ runners.forEach(function([runnerName, appname]) { async function sendRequestToApplication(listening) { let lastErr = null - for (let i = 0; i < 3; i++) { + for (let i = 0; i < 4; i++) { try { let checkListening = await request({}, `http://localhost:${listening.port}/`) return checkListening } catch (err) { lastErr = err - await setTimeout(150) + integrationLog.info(`Request http://localhost:${listening.port}/ failed with ${err.message} trying again in 250ms`) + await setTimeout(250) } } log('-- core.test.integration.mjs crash here --')