Skip to content

Commit 2b8429e

Browse files
In some corner cases we have seen TestRunStatistics from AzureEngine to be null, this fix waits a little longer in such scenarios to avoid NPE
1 parent 45e93f2 commit 2b8429e

File tree

1 file changed

+2
-1
lines changed
  • jmeter-java-dsl-azure/src/main/java/us/abstracta/jmeter/javadsl/azure

1 file changed

+2
-1
lines changed

jmeter-java-dsl-azure/src/main/java/us/abstracta/jmeter/javadsl/azure/AzureEngine.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,8 @@ private TestRun awaitTestEnd(TestRun testRun)
532532

533533
private TestRun awaitVirtualUsers(TestRun testRun) throws InterruptedException, IOException {
534534
Instant start = Instant.now();
535-
while (testRun.getVirtualUsers() == null && !hasTimedOut(TEST_END_TIMEOUT, start)) {
535+
while ((testRun.getVirtualUsers() == null || testRun.getTestRunStatistics() == null)
536+
&& !hasTimedOut(TEST_END_TIMEOUT, start)) {
536537
Thread.sleep(STATUS_POLL_PERIOD.toMillis());
537538
testRun = apiClient.findTestRunById(testRun.getId());
538539
}

0 commit comments

Comments
 (0)