From 1cfd6bba5d571904df6d954627ef146969e5a202 Mon Sep 17 00:00:00 2001 From: nirupa-kumar Date: Wed, 19 Dec 2018 10:44:49 -0800 Subject: [PATCH 1/3] Update to use shared data bucket for import test in Product Search --- .../src/test/java/com/example/vision/ImportProductSetsIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vision/product-search/cloud-client/src/test/java/com/example/vision/ImportProductSetsIT.java b/vision/product-search/cloud-client/src/test/java/com/example/vision/ImportProductSetsIT.java index deea049c678..da946130afa 100644 --- a/vision/product-search/cloud-client/src/test/java/com/example/vision/ImportProductSetsIT.java +++ b/vision/product-search/cloud-client/src/test/java/com/example/vision/ImportProductSetsIT.java @@ -34,7 +34,7 @@ public class ImportProductSetsIT { private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); private static final String COMPUTE_REGION = "us-west1"; private static final String GCS_URI = - "gs://java-docs-samples-testing/product-search/product_sets.csv"; + "gs://cloud-samples-data/vision/product_search/product_sets.csv"; private static final String PRODUCT_SET_ID = "fake_product_set_id_for_testing"; private static final String PRODUCT_ID_1 = "fake_product_id_for_testing_1"; private static final String PRODUCT_ID_2 = "fake_product_id_for_testing_2"; From 5784d4f045dd7284a562f07aa072e3e2625dad9e Mon Sep 17 00:00:00 2001 From: nirupa-kumar Date: Thu, 20 Dec 2018 10:18:31 -0800 Subject: [PATCH 2/3] Include note for Similar Product Search --- .../src/test/java/com/example/vision/ProductSearchIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vision/product-search/cloud-client/src/test/java/com/example/vision/ProductSearchIT.java b/vision/product-search/cloud-client/src/test/java/com/example/vision/ProductSearchIT.java index 367c4965eef..041b8c8e671 100644 --- a/vision/product-search/cloud-client/src/test/java/com/example/vision/ProductSearchIT.java +++ b/vision/product-search/cloud-client/src/test/java/com/example/vision/ProductSearchIT.java @@ -62,7 +62,7 @@ public void tearDown() throws Exception { ProductSetManagement.deleteProductSet(PROJECT_ID, COMPUTE_REGION, PRODUCT_SET_ID); System.setOut(null); } - + //Tests rely on pre-created product set that has been indexed. @Test public void testGetSimilarProductsFile() throws Exception { // Act From 71055486e29ff3cf16e42a381a56de28c3784db7 Mon Sep 17 00:00:00 2001 From: nirupa-kumar Date: Thu, 20 Dec 2018 10:57:51 -0800 Subject: [PATCH 3/3] Fix test failures --- .../src/test/java/com/example/vision/ProductSearchIT.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vision/product-search/cloud-client/src/test/java/com/example/vision/ProductSearchIT.java b/vision/product-search/cloud-client/src/test/java/com/example/vision/ProductSearchIT.java index 041b8c8e671..79124daafd9 100644 --- a/vision/product-search/cloud-client/src/test/java/com/example/vision/ProductSearchIT.java +++ b/vision/product-search/cloud-client/src/test/java/com/example/vision/ProductSearchIT.java @@ -26,7 +26,10 @@ import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -/** Integration (system) tests for {@link ProductSearch}. */ +/** + * Integration (system) tests for {@link ProductSearch}.Tests rely on pre-created product set + * that has been indexed. + **/ @RunWith(JUnit4.class) @SuppressWarnings("checkstyle:abbreviationaswordinname") public class ProductSearchIT { @@ -62,7 +65,7 @@ public void tearDown() throws Exception { ProductSetManagement.deleteProductSet(PROJECT_ID, COMPUTE_REGION, PRODUCT_SET_ID); System.setOut(null); } - //Tests rely on pre-created product set that has been indexed. + @Test public void testGetSimilarProductsFile() throws Exception { // Act