2626import org .junit .runner .RunWith ;
2727import org .junit .runners .JUnit4 ;
2828
29- /** Integration (system) tests for {@link ProductSearch}. */
29+ /**
30+ * Integration (system) tests for {@link ProductSearch}.Tests rely on pre-created product set
31+ * that has been indexed.
32+ **/
3033@ RunWith (JUnit4 .class )
3134@ SuppressWarnings ("checkstyle:abbreviationaswordinname" )
3235public class ProductSearchIT {
3336 private static final String PROJECT_ID = System .getenv ("GOOGLE_CLOUD_PROJECT" );
3437 private static final String COMPUTE_REGION = "us-west1" ;
35- private static final String GCS_URI =
36- "gs://java-docs-samples-testing/product-search/indexed_product_sets.csv" ;
3738 private static final String PRODUCT_SET_ID = "indexed_product_set_id_for_testing" ;
3839 private static final String PRODUCT_CATEGORY = "apparel" ;
3940 private static final String PRODUCT_ID_1 = "indexed_product_id_for_testing_1" ;
4041 private static final String PRODUCT_ID_2 = "indexed_product_id_for_testing_2" ;
4142 private static final String IMAGE_URI_1 =
42- "gs://java-docs- samples-testing/product-search /shoes_1.jpg" ;
43+ "gs://cloud- samples-data/vision/product_search /shoes_1.jpg" ;
4344 private static final String FILE_PATH_1 = "./resources/shoes_1.jpg" ;
4445 private static final String FILTER = "style=womens" ;
4546 private ByteArrayOutputStream bout ;
@@ -51,15 +52,11 @@ public void setUp() throws Exception {
5152 bout = new ByteArrayOutputStream ();
5253 out = new PrintStream (bout );
5354 System .setOut (out );
54- ImportProductSets .importProductSets (PROJECT_ID , COMPUTE_REGION , GCS_URI );
5555 bout .reset ();
5656 }
5757
5858 @ After
5959 public void tearDown () throws Exception {
60- ProductManagement .deleteProduct (PROJECT_ID ,COMPUTE_REGION ,PRODUCT_ID_1 );
61- ProductManagement .deleteProduct (PROJECT_ID ,COMPUTE_REGION ,PRODUCT_ID_2 );
62- ProductSetManagement .deleteProductSet (PROJECT_ID , COMPUTE_REGION , PRODUCT_SET_ID );
6360 System .setOut (null );
6461 }
6562
0 commit comments