Skip to content

Commit

Permalink
In some corner cases we have seen TestRunStatistics from AzureEngine …
Browse files Browse the repository at this point in the history
…to be null, this fix waits a little longer in such scenarios to avoid NPE
  • Loading branch information
rabelenda-abstracta committed Mar 13, 2024
1 parent 45e93f2 commit 2b8429e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,8 @@ private TestRun awaitTestEnd(TestRun testRun)

private TestRun awaitVirtualUsers(TestRun testRun) throws InterruptedException, IOException {
Instant start = Instant.now();
while (testRun.getVirtualUsers() == null && !hasTimedOut(TEST_END_TIMEOUT, start)) {
while ((testRun.getVirtualUsers() == null || testRun.getTestRunStatistics() == null)
&& !hasTimedOut(TEST_END_TIMEOUT, start)) {
Thread.sleep(STATUS_POLL_PERIOD.toMillis());
testRun = apiClient.findTestRunById(testRun.getId());
}
Expand Down

0 comments on commit 2b8429e

Please sign in to comment.