Sleep to avoid active wait.
@@ -112,9 +112,12 @@ public class DeployTester {
}
public Tenant tenant() {
- Tenant tenant = null;
+ Tenant tenant = tenants.defaultTenant();
// TODO Retry since there is some code removing/updating the default tenant which should not be done.
while (tenant == null) {
+ try {
+ Thread.sleep(1);
+ } catch (InterruptedException e) {}
tenant = tenants.defaultTenant();
}
return tenant;
