diff options
Diffstat (limited to 'server/tests/real-world')
-rw-r--r-- | server/tests/real-world/real-world.ts | 14 | ||||
-rw-r--r-- | server/tests/real-world/tools/upload-directory.ts | 3 |
2 files changed, 9 insertions, 8 deletions
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() | |||
80 | async function start () { | 80 | async function start () { |
81 | const servers = await runServers(numberOfPods) | 81 | const servers = await runServers(numberOfPods) |
82 | 82 | ||
83 | process.on('exit', async () => await exitServers(servers, flushAtExit)) | 83 | process.on('exit', async () => { |
84 | await exitServers(servers, flushAtExit) | ||
85 | |||
86 | return | ||
87 | }) | ||
84 | process.on('SIGINT', goodbye) | 88 | process.on('SIGINT', goodbye) |
85 | process.on('SIGTERM', goodbye) | 89 | process.on('SIGTERM', goodbye) |
86 | 90 | ||
87 | console.log('Servers runned') | 91 | console.log('Servers ran') |
88 | initializeRequestsPerServer(servers) | 92 | initializeRequestsPerServer(servers) |
89 | 93 | ||
90 | let checking = false | 94 | let checking = false |
@@ -150,10 +154,8 @@ function getRandomNumServer (servers) { | |||
150 | } | 154 | } |
151 | 155 | ||
152 | async function runServers (numberOfPods: number) { | 156 | async function runServers (numberOfPods: number) { |
153 | let servers = null | 157 | const servers: ServerInfo[] = (await flushAndRunMultipleServers(numberOfPods)) |
154 | 158 | .map(s => Object.assign({ requestsNumber: 0 }, s)) | |
155 | // Run servers | ||
156 | servers = await flushAndRunMultipleServers(numberOfPods) | ||
157 | 159 | ||
158 | // Get the access tokens | 160 | // Get the access tokens |
159 | await setAccessTokensToServers(servers) | 161 | 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 @@ | |||
1 | import * as program from 'commander' | 1 | import * as program from 'commander' |
2 | import * as Promise from 'bluebird' | 2 | import * as Promise from 'bluebird' |
3 | import { isAbsolute } from 'path' | 3 | import { isAbsolute, join } from 'path' |
4 | import { join } from 'path' | ||
5 | 4 | ||
6 | import { readdirPromise } from '../../../helpers/core-utils' | 5 | import { readdirPromise } from '../../../helpers/core-utils' |
7 | import { execCLI } from '../../utils' | 6 | import { execCLI } from '../../utils' |