Fix some test, update version
continuous-integration/appveyor/branch AppVeyor build failed Details

master
Jonatan Nilsson 2022-03-10 12:24:57 +00:00
parent 746e0c3f46
commit 4d15623a23
2 changed files with 5 additions and 3 deletions

View File

@ -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": {

View File

@ -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 --')