Add a system setting for Glacier's initial wait.
Glacier has an initial wait parameter, which is used to check on the
progress of a job. By default, it is set to 3 hours. This may work
well against existing AWS Glacier interface, however, against a
Glacier emulator the timeout should be overriden. The change allows
setting the timeout to an arbitrary shorter value with
-Dtest.glacier.initial-wait.
diff --git a/glacier/src/main/java/org/jclouds/glacier/blobstore/strategy/internal/BasePollingStrategy.java b/glacier/src/main/java/org/jclouds/glacier/blobstore/strategy/internal/BasePollingStrategy.java
index d02137b..eeb179f 100644
--- a/glacier/src/main/java/org/jclouds/glacier/blobstore/strategy/internal/BasePollingStrategy.java
+++ b/glacier/src/main/java/org/jclouds/glacier/blobstore/strategy/internal/BasePollingStrategy.java
@@ -48,7 +48,8 @@
@Inject
public BasePollingStrategy(GlacierClient client) {
- this(client, DEFAULT_INITIAL_WAIT, DEFAULT_TIME_BETWEEN_POLLS);
+ this(client, Long.parseLong(System.getProperty("test.glacier.initial-wait",
+ Long.toString(DEFAULT_INITIAL_WAIT))), DEFAULT_TIME_BETWEEN_POLLS);
}
private boolean inProgress(String job, String vault) {