Skip to content

Commit 72510fc

Browse files
test: add retries to create glossary test (#923)
* test: add retries to create glossary test * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 05b4501 commit 72510fc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

translate/snippets/src/test/java/com/example/translate/CreateGlossaryTests.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import static com.google.common.truth.Truth.assertThat;
2020
import static junit.framework.TestCase.assertNotNull;
2121

22+
import com.google.cloud.testing.junit4.MultipleAttemptsRule;
2223
import java.io.ByteArrayOutputStream;
2324
import java.io.IOException;
2425
import java.io.PrintStream;
@@ -29,6 +30,7 @@
2930
import org.junit.After;
3031
import org.junit.Before;
3132
import org.junit.BeforeClass;
33+
import org.junit.Rule;
3234
import org.junit.Test;
3335
import org.junit.runner.RunWith;
3436
import org.junit.runners.JUnit4;
@@ -76,6 +78,8 @@ public void tearDown() throws InterruptedException, ExecutionException, IOExcept
7678
System.setOut(originalPrintStream);
7779
}
7880

81+
@Rule public MultipleAttemptsRule multipleAttemptsRule = new MultipleAttemptsRule(3);
82+
7983
@Test
8084
public void testCreateGlossary() throws InterruptedException, ExecutionException, IOException {
8185
List<String> languageCodes = new ArrayList<>();

0 commit comments

Comments
 (0)