File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
vision/snippets/src/test/java/com/example/vision Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 2626import java .io .ByteArrayOutputStream ;
2727import java .io .IOException ;
2828import java .io .PrintStream ;
29+ import java .util .UUID ;
2930
3031import org .junit .After ;
3132import org .junit .Before ;
@@ -42,7 +43,7 @@ public class DetectIT {
4243 private static final String PROJECT_ID = System .getenv ("GOOGLE_CLOUD_PROJECT" );
4344 private static final String ASSET_BUCKET = "cloud-samples-data" ;
4445 private static final String OUTPUT_BUCKET = PROJECT_ID ;
45- private static final String OUTPUT_PREFIX = "OCR_PDF_TEST_OUTPUT" ;
46+ private static final String OUTPUT_PREFIX = "OCR_PDF_TEST_OUTPUT_" + UUID . randomUUID (). toString () ;
4647
4748 @ Before
4849 public void setUp () throws IOException {
@@ -363,13 +364,13 @@ public void testDetectDocumentsGcs() throws Exception {
363364
364365 // Assert
365366 String got = bout .toString ();
367+
366368 assertThat (got ).contains ("OIL, GAS AND MINERAL LEASE" );
367369
368370 Storage storage = StorageOptions .getDefaultInstance ().getService ();
369371
370372 Page <Blob > blobs = storage .list (OUTPUT_BUCKET , BlobListOption .currentDirectory (),
371373 BlobListOption .prefix (OUTPUT_PREFIX + "/" ));
372-
373374 for (Blob blob : blobs .iterateAll ()) {
374375 blob .delete ();
375376 }
@@ -397,4 +398,4 @@ public void testDetectLocalizedObjectsGcs() throws Exception {
397398 String got = bout .toString ().toLowerCase ();
398399 assertThat (got ).contains ("dog" );
399400 }
400- }
401+ }
You can’t perform that action at this time.
0 commit comments