Skip to content

Commit

Permalink
chore: Fix batch tests (#593)
Browse files Browse the repository at this point in the history
* 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 <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and Shabirmean committed Nov 17, 2022
1 parent d76d1e2 commit c9fd14e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit c9fd14e

Please sign in to comment.