|
|
@@ -136,12 +136,13 @@ class OliveTinTestRunnerStartLocalProcess extends OliveTinTestRunner {
|
|
|
|
|
|
this.ot = null
|
|
|
|
|
|
- if (process.env.CI === 'true') {
|
|
|
- // GitHub runners seem to need a bit more time to clean up
|
|
|
- await new Promise((res) => setTimeout(res, 3000))
|
|
|
- } else {
|
|
|
- await new Promise((res) => setTimeout(res, 50))
|
|
|
- }
|
|
|
+ // The next suite binds the same ports, so wait until they are released
|
|
|
+ // rather than sleeping for a guessed amount of time.
|
|
|
+ await waitOn({
|
|
|
+ resources: ['tcp:127.0.0.1:1337', 'tcp:127.0.0.1:1341'],
|
|
|
+ reverse: true,
|
|
|
+ timeout: 10000,
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
|