diff --git a/common/utils/src/main/java/org/graalvm/buildtools/utils/ExponentialBackoff.java b/common/utils/src/main/java/org/graalvm/buildtools/utils/ExponentialBackoff.java index 048599abc..bdb4dba52 100644 --- a/common/utils/src/main/java/org/graalvm/buildtools/utils/ExponentialBackoff.java +++ b/common/utils/src/main/java/org/graalvm/buildtools/utils/ExponentialBackoff.java @@ -24,13 +24,13 @@ */ public class ExponentialBackoff { private static final int DEFAULT_MAX_RETRIES = 3; - private static final Duration INITIAL_WAIT_PERIOD = Duration.of(250, ChronoUnit.MILLIS); + private static final Duration DEFAULT_INITIAL_WAIT_PERIOD = Duration.of(250, ChronoUnit.MILLIS); private final int maxRetries; private final Duration initialWaitPeriod; public ExponentialBackoff() { - this(DEFAULT_MAX_RETRIES, INITIAL_WAIT_PERIOD); + this(DEFAULT_MAX_RETRIES, DEFAULT_INITIAL_WAIT_PERIOD); } private ExponentialBackoff(int maxRetries, Duration initialWaitPeriod) { diff --git a/common/utils/src/test/java/org/graalvm/buildtools/utils/ExponentialBackoffTest.java b/common/utils/src/test/java/org/graalvm/buildtools/utils/ExponentialBackoffTest.java index 5ccbd3dc4..ded4212e5 100644 --- a/common/utils/src/test/java/org/graalvm/buildtools/utils/ExponentialBackoffTest.java +++ b/common/utils/src/test/java/org/graalvm/buildtools/utils/ExponentialBackoffTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.graalvm.buildtools.utils; import org.junit.jupiter.api.DisplayName;