From 53abc4c272be9ecc951274458d054dbaf86e594d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 31 Oct 2017 16:31:24 +0100 Subject: Upgrade server packages --- server/tests/real-world/real-world.ts | 14 ++++++++------ server/tests/real-world/tools/upload-directory.ts | 3 +-- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'server/tests/real-world') diff --git a/server/tests/real-world/real-world.ts b/server/tests/real-world/real-world.ts index e225a1266..da5696f8c 100644 --- a/server/tests/real-world/real-world.ts +++ b/server/tests/real-world/real-world.ts @@ -80,11 +80,15 @@ start() async function start () { const servers = await runServers(numberOfPods) - process.on('exit', async () => await exitServers(servers, flushAtExit)) + process.on('exit', async () => { + await exitServers(servers, flushAtExit) + + return + }) process.on('SIGINT', goodbye) process.on('SIGTERM', goodbye) - console.log('Servers runned') + console.log('Servers ran') initializeRequestsPerServer(servers) let checking = false @@ -150,10 +154,8 @@ function getRandomNumServer (servers) { } async function runServers (numberOfPods: number) { - let servers = null - - // Run servers - servers = await flushAndRunMultipleServers(numberOfPods) + const servers: ServerInfo[] = (await flushAndRunMultipleServers(numberOfPods)) + .map(s => Object.assign({ requestsNumber: 0 }, s)) // Get the access tokens await setAccessTokensToServers(servers) diff --git a/server/tests/real-world/tools/upload-directory.ts b/server/tests/real-world/tools/upload-directory.ts index a8ab1669d..fdd56857a 100644 --- a/server/tests/real-world/tools/upload-directory.ts +++ b/server/tests/real-world/tools/upload-directory.ts @@ -1,7 +1,6 @@ import * as program from 'commander' import * as Promise from 'bluebird' -import { isAbsolute } from 'path' -import { join } from 'path' +import { isAbsolute, join } from 'path' import { readdirPromise } from '../../../helpers/core-utils' import { execCLI } from '../../utils' -- cgit v1.2.3