test: add a delay after starting the npm registry

Attempt at improving test reliability on CI
This commit is contained in:
Pierre Vanduynslager 2017-12-12 01:54:59 -05:00
parent 8942093c18
commit 3316f1a79e
2 changed files with 3 additions and 0 deletions

View File

@ -41,6 +41,7 @@
"codecov": "^3.0.0",
"commitizen": "^2.9.6",
"cz-conventional-changelog": "^2.0.0",
"delay": "^2.0.0",
"dockerode": "^2.5.2",
"eslint-config-prettier": "^2.5.0",
"eslint-plugin-prettier": "^2.3.0",

View File

@ -1,6 +1,7 @@
import Docker from 'dockerode';
import getStream from 'get-stream';
import got from 'got';
import delay from 'delay';
import pRetry from 'p-retry';
const IMAGE = 'npmjs/npm-docker-couchdb:1.6.1';
@ -28,6 +29,7 @@ async function start() {
});
await container.start();
await delay(3000);
try {
// Wait for the registry to be ready