Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Commit ead9eb7

Browse files
committed
Duration is in sec not ms 🤦‍♂️
1 parent 30b1cac commit ead9eb7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/integration/helpers.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ const k8sPodsApi = kc.makeApiClient(k8s.CoreV1Api);
99

1010
const namespace = "integration-tests";
1111

12-
const sleep = (duration) =>
13-
new Promise((resolve) => setTimeout(resolve, duration * 1000));
12+
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms * 1000));
1413

1514
async function deleteScan(name) {
1615
await k8sCRDApi.deleteNamespacedCustomObject(
@@ -125,7 +124,7 @@ async function scan(name, scanType, parameters = [], timeout = 180) {
125124
if (status && status.state === "Done") {
126125
await deleteScan(actualName);
127126
// Wait a couple seconds to give kubernetes more time to update the fields
128-
await sleep(2000);
127+
await sleep(2);
129128
const { status } = await getScan(actualName);
130129
return status.findings;
131130
} else if (status && status.state === "Errored") {

0 commit comments

Comments
 (0)