Commit f5aef234c925bce5e965b73762383bd5a7c09d17

Authored by George Vlahavas
1 parent 4e12feb649

Add sleep between api calls

Showing 1 changed file with 9 additions and 0 deletions

kea_integration.groovy View file @ f5aef23
... ... @@ -42,9 +42,15 @@
42 42 error("$testName: Returned status code = $responseCode when calling $url")
43 43 }
44 44 String processId = responseCode.split(",")[1].split(":")[1];
  45 +
  46 + sleep 5;
  47 +
45 48 url = "$APP_URL/api/v1/xlsiem"
46 49 responseCode = sh(label: testName, script: "curl -m 10 -sL -w '%{http_code}' -H 'Authorization: Bearer $token' -H 'Accept: application/json' -H 'Content-Type: application/json' --data-raw \"`cat pcap-data/mltd1-unix.json`\" $url -o /dev/null", returnStdout: true)
47 50 echo responseCode
  51 +
  52 + sleep 5;
  53 +
48 54 if (responseCode != '200') {
49 55 error("$testName: Returned status code = $responseCode when calling $url")
50 56 }
... ... @@ -53,6 +59,9 @@
53 59 if (responseCode != '200') {
54 60 error("$testName: Returned status code = $responseCode when calling $url")
55 61 }
  62 +
  63 + sleep 5;
  64 +
56 65 url = "$APP_URL/api/v1/mltd/stop/$processId"
57 66 responseCode = sh(label: testName, script: "curl -m 10 -sLI -w '%{http_code}' -H 'Authorization: Bearer $token' -H 'Accept: application/json, text/plain, */*' $url -o /dev/null", returnStdout: true)
58 67 echo responseCode