|
InstanceGroupManagersListManagedInstancesResponse response; |
|
while (true) { |
|
try { |
|
response = |
|
compute |
|
.instanceGroupManagers() |
|
.listManagedInstances(project, params.getZone(), instanceName()) |
|
.execute(); |
|
} catch (GoogleJsonResponseException e) { |
|
log.warn("Unable to fetch response: ", e); |
|
continue; |
|
} |
|
|
|
if (response != null) { |
|
if (response.getManagedInstances() != null) { |
|
if (response.getManagedInstances().stream() |
|
.allMatch(i -> "RUNNING".equals(i.getInstanceStatus()))) { |
|
break; |
|
} |
|
} |
|
} |
|
|
|
log.warn("Instances not yet ready: " + (response == null ? "null" : response)); |
|
Thread.sleep(10000); |
|
} |
By default, instanceGroupManagers.listManagedInstances returns 500 results. If someone were to run the load test framework with publisher workers + subscriber workers > 500, then it's possible for the load test to start without all GCE instances ready to run (there's probably other issues as well).
This is probably not a big deal unless users are trying to run very expensive load tests with this framework.
pubsub/load-test-framework/src/main/java/com/google/pubsub/flic/controllers/resource_controllers/GCEComputeResourceController.java
Lines 240 to 264 in dced135
By default, instanceGroupManagers.listManagedInstances returns 500 results. If someone were to run the load test framework with publisher workers + subscriber workers > 500, then it's possible for the load test to start without all GCE instances ready to run (there's probably other issues as well).
This is probably not a big deal unless users are trying to run very expensive load tests with this framework.