Fix test timing (#3241)

pull/3243/head
Jeff Mitchell 3 years ago committed by GitHub
parent 5b98aecaba
commit d5ad1f078a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -445,6 +445,10 @@ func NewTestMultihopWorkers(t testing.TB,
WorkerAuthDebuggingEnabled: enableAuthDebugging,
DownstreamWorkerAuthKms: childDownstreamWrapper,
})
t.Cleanup(kmsWorker.Shutdown)
// Give time for it to be inserted into the database
time.Sleep(2 * time.Second)
// names should not be set when using pki workers
pkiWorkerConf, err := config.DevWorker()
@ -497,6 +501,7 @@ func NewTestMultihopWorkers(t testing.TB,
Config: childPkiWorkerConf,
WorkerAuthDebuggingEnabled: enableAuthDebugging,
})
t.Cleanup(childPkiWorker.Shutdown)
// Give time for it to be inserted into the database
time.Sleep(2 * time.Second)
@ -532,9 +537,10 @@ func NewTestMultihopWorkers(t testing.TB,
WorkerAuthKms: childDownstreamWrapper2,
WorkerAuthDebuggingEnabled: enableAuthDebugging,
})
t.Cleanup(childKmsWorker.Shutdown)
// Sleep so that workers can startup and connect.
time.Sleep(10 * time.Second)
time.Sleep(12 * time.Second)
return kmsWorker, pkiWorker, childPkiWorker, childKmsWorker
}

Loading…
Cancel
Save