Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Commit 9a4218a

Browse files
committed
add imports
1 parent 7cae8c7 commit 9a4218a

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

samples/snippets/src/test/java/com/example/bigquery/SetCustomRetryAlgorithmIT.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@
1818

1919
import static com.google.common.truth.Truth.assertThat;
2020

21+
import com.google.api.gax.retrying.ResultRetryAlgorithm;
22+
import com.google.cloud.ExceptionHandler;
2123
import java.io.ByteArrayOutputStream;
2224
import java.io.PrintStream;
25+
import java.util.concurrent.TimeoutException;
2326
import java.util.logging.Level;
2427
import java.util.logging.Logger;
2528
import org.junit.After;
@@ -34,6 +37,14 @@ public class SetCustomRetryAlgorithmIT {
3437

3538
private static final String PROJECT_ID = requireEnvVar("GOOGLE_CLOUD_PROJECT");
3639

40+
private static String requireEnvVar(String varName) {
41+
String value = System.getenv(varName);
42+
assertNotNull(
43+
"Environment variable " + varName + " is required to perform these tests.",
44+
System.getenv(varName));
45+
return value;
46+
}
47+
3748
@Before
3849
public void setUp() throws Exception {
3950
bout = new ByteArrayOutputStream();
@@ -59,6 +70,6 @@ public void testSetCustomRetryAlgorithm() {
5970
.build();
6071

6172
SetCustomRetryAlgorithm.setCustomRetryAlgorithm(PROJECT_ID, retryAlgorithm);
62-
assertThat(bout.toString().contains("r"));
73+
assertThat(bout.toString().contains("com.google.cloud.ExceptionHandler"));
6374
}
6475
}

0 commit comments

Comments
 (0)