From ce5c251d0e63de6ff11e52955ff4275c3f6dfde3 Mon Sep 17 00:00:00 2001 From: Mike <45373284+munkhuushmgl@users.noreply.github.com> Date: Mon, 21 Jun 2021 15:02:47 -0600 Subject: [PATCH] chore: Fix batch tests (#593) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: fix batch test * chore: revert model IDs * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md * chore: added / Co-authored-by: Owl Bot --- .../java/com/example/translate/BatchTranslateTextTests.java | 4 +--- .../BatchTranslateTextWithGlossaryAndModelTests.java | 4 +--- .../translate/BatchTranslateTextWithGlossaryTests.java | 4 +--- .../example/translate/BatchTranslateTextWithModelTests.java | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/translate/snippets/src/test/java/com/example/translate/BatchTranslateTextTests.java b/translate/snippets/src/test/java/com/example/translate/BatchTranslateTextTests.java index 9fb051e80a4..abd031bf5a4 100644 --- a/translate/snippets/src/test/java/com/example/translate/BatchTranslateTextTests.java +++ b/translate/snippets/src/test/java/com/example/translate/BatchTranslateTextTests.java @@ -27,7 +27,6 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; -import java.util.UUID; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; import org.junit.After; @@ -45,8 +44,7 @@ public class BatchTranslateTextTests { private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); private static final String INPUT_URI = "gs://cloud-samples-data/translation/text.txt"; - private static final String PREFIX = - String.format("translation-%s/%s", UUID.randomUUID(), "BATCH_TRANSLATION_OUTPUT/"); + private static final String PREFIX = "BATCH_TRANSLATION_OUTPUT/"; private static final String OUTPUT_URI = String.format("gs://%s/%s", PROJECT_ID, PREFIX); private ByteArrayOutputStream bout; diff --git a/translate/snippets/src/test/java/com/example/translate/BatchTranslateTextWithGlossaryAndModelTests.java b/translate/snippets/src/test/java/com/example/translate/BatchTranslateTextWithGlossaryAndModelTests.java index c7e95e51c20..7cdce709dfe 100644 --- a/translate/snippets/src/test/java/com/example/translate/BatchTranslateTextWithGlossaryAndModelTests.java +++ b/translate/snippets/src/test/java/com/example/translate/BatchTranslateTextWithGlossaryAndModelTests.java @@ -27,7 +27,6 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; -import java.util.UUID; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; import org.junit.After; @@ -48,8 +47,7 @@ public class BatchTranslateTextWithGlossaryAndModelTests { "gs://cloud-samples-data/translation/text_with_custom_model_and_glossary.txt"; private static final String GLOSSARY_ID = "DO_NOT_DELETE_TEST_GLOSSARY"; private static final String MODEL_ID = "TRL3645318651705294848"; - private static final String PREFIX = - String.format("translation-%s/%s", UUID.randomUUID(), "BATCH_TRANSLATION_WITH_MODEL_OUTPUT/"); + private static final String PREFIX = "BATCH_TRANSLATION_MODEL_GLOS_OUTPUT/"; private static final String OUTPUT_URI = String.format("gs://%s/%s", PROJECT_ID, PREFIX); private ByteArrayOutputStream bout; diff --git a/translate/snippets/src/test/java/com/example/translate/BatchTranslateTextWithGlossaryTests.java b/translate/snippets/src/test/java/com/example/translate/BatchTranslateTextWithGlossaryTests.java index 950b733e962..2e2bc576edd 100644 --- a/translate/snippets/src/test/java/com/example/translate/BatchTranslateTextWithGlossaryTests.java +++ b/translate/snippets/src/test/java/com/example/translate/BatchTranslateTextWithGlossaryTests.java @@ -27,7 +27,6 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; -import java.util.UUID; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; import org.junit.After; @@ -47,8 +46,7 @@ public class BatchTranslateTextWithGlossaryTests { private static final String INPUT_URI = "gs://cloud-samples-data/translation/text_with_glossary.txt"; private static final String GLOSSARY_ID = "DO_NOT_DELETE_TEST_GLOSSARY"; - private static final String PREFIX = - String.format("translation-%s/%s", UUID.randomUUID(), "BATCH_TRANSLATION_GLOSSARY_OUTPUT/"); + private static final String PREFIX = "BATCH_TRANSLATION_GLOSSARY_OUTPUT/"; private static final String OUTPUT_URI = String.format("gs://%s/%s", PROJECT_ID, PREFIX); private ByteArrayOutputStream bout; diff --git a/translate/snippets/src/test/java/com/example/translate/BatchTranslateTextWithModelTests.java b/translate/snippets/src/test/java/com/example/translate/BatchTranslateTextWithModelTests.java index 7fdc42ddbe8..e999d659b74 100644 --- a/translate/snippets/src/test/java/com/example/translate/BatchTranslateTextWithModelTests.java +++ b/translate/snippets/src/test/java/com/example/translate/BatchTranslateTextWithModelTests.java @@ -27,7 +27,6 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; -import java.util.UUID; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeoutException; import org.junit.After; @@ -47,8 +46,7 @@ public class BatchTranslateTextWithModelTests { private static final String INPUT_URI = "gs://cloud-samples-data/translation/custom_model_text.txt"; private static final String MODEL_ID = "TRL3645318651705294848"; - private static final String PREFIX = - String.format("translation-%s/%s", UUID.randomUUID(), "BATCH_TRANSLATION_MODEL_GLOS_OUTPUT/"); + private static final String PREFIX = "BATCH_TRANSLATION_WITH_MODEL_OUTPUT/"; private static final String OUTPUT_URI = String.format("gs://%s/%s", PROJECT_ID, PREFIX); private ByteArrayOutputStream bout;