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.
This commit is contained in:
Timur Alperovich 2016-07-04 16:26:35 -07:00 committed by Ignasi Barrera
parent af7f4eeb51
commit f61be9aa94
1 changed files with 2 additions and 1 deletions

View File

@ -48,7 +48,8 @@ public class BasePollingStrategy implements PollingStrategy {
@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) {