test: Create single function for port generation

This reduces the chances of several integration tests
re-using the same port.
This commit is contained in:
Joachim Van Herwegen
2021-04-16 11:21:50 +02:00
parent d1eadd75e7
commit fa8d406f34
8 changed files with 35 additions and 7 deletions

View File

@@ -4,9 +4,10 @@ import type { BaseHttpServerFactory } from '../../src/server/BaseHttpServerFacto
import type { HttpHandlerInput } from '../../src/server/HttpHandler';
import { HttpHandler } from '../../src/server/HttpHandler';
import { StaticAsyncHandler } from '../util/StaticAsyncHandler';
import { getPort } from '../util/Util';
import { instantiateFromConfig } from './Config';
const port = 6002;
const port = getPort('Middleware');
class SimpleHttpHandler extends HttpHandler {
public async handle(input: HttpHandlerInput): Promise<void> {