This repository was archived by the owner on Mar 23, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
samples/snippets/src/test/java/com/example/bigquery Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818
1919import static com .google .common .truth .Truth .assertThat ;
2020
21+ import com .google .api .gax .retrying .ResultRetryAlgorithm ;
22+ import com .google .cloud .ExceptionHandler ;
2123import java .io .ByteArrayOutputStream ;
2224import java .io .PrintStream ;
25+ import java .util .concurrent .TimeoutException ;
2326import java .util .logging .Level ;
2427import java .util .logging .Logger ;
2528import 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}
You can’t perform that action at this time.
0 commit comments