Author: adietish
Date: 2011-02-07 08:00:30 -0500 (Mon, 07 Feb 2011)
New Revision: 29041
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
Log:
[JBIDE-8343] increased wait delay for refreshing instance, waiting before refreshing (was:
refreshed first and waited afterwards)
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2011-02-07
12:56:20 UTC (rev 29040)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2011-02-07
13:00:30 UTC (rev 29041)
@@ -36,6 +36,8 @@
*/
public class DeltaCloud extends ObservablePojo {
+ private static final int WAIT_FOR_STATE_DELAY = 2000;
+
public static final String PROP_INSTANCES = "instances";
public static final String PROP_INSTANCES_REMOVED = "instancesRemoved";
public static final String PROP_IMAGES = "images";
@@ -280,12 +282,12 @@
DeltaCloudInstance instance = getInstancesRepository().getById(instanceId);
if (instance != null) {
while (!pm.isCanceled()) {
+ Thread.sleep(WAIT_FOR_STATE_DELAY);
+ instance = refreshInstance(instance);
if (stateMatcher.matchesState(instance, instance.getState())
|| instance.getState().equals(DeltaCloudInstance.State.TERMINATED)) {
return instance;
}
- Thread.sleep(400);
- instance = refreshInstance(instance);
}
}
return instance;
Show replies by date