27
27
import com .google .cloud .bigquery .Dataset ;
28
28
import com .google .cloud .bigquery .DatasetId ;
29
29
import com .google .cloud .bigquery .DatasetInfo ;
30
+ import com .google .cloud .testing .junit4 .MultipleAttemptsRule ;
30
31
import java .io .ByteArrayOutputStream ;
31
32
import java .io .IOException ;
32
33
import java .io .PrintStream ;
40
41
import org .junit .After ;
41
42
import org .junit .Before ;
42
43
import org .junit .BeforeClass ;
44
+ import org .junit .Rule ;
43
45
import org .junit .Test ;
44
46
import org .junit .runner .RunWith ;
45
47
import org .junit .runners .JUnit4 ;
46
48
49
+
47
50
@ RunWith (JUnit4 .class )
48
51
public class FeatureValuesSamplesTest {
52
+ @ Rule public final MultipleAttemptsRule multipleAttemptsRule = new MultipleAttemptsRule (3 );
49
53
50
54
private static final String PROJECT_ID = System .getenv ("UCAIP_PROJECT_ID" );
51
55
private static final int MIN_NODE_COUNT = 1 ;
@@ -150,7 +154,7 @@ public void tearDown()
150
154
151
155
// Delete the featurestore
152
156
DeleteFeaturestoreSample .deleteFeaturestoreSample (
153
- PROJECT_ID , featurestoreId , USE_FORCE , LOCATION , ENDPOINT , 300 );
157
+ PROJECT_ID , featurestoreId , USE_FORCE , LOCATION , ENDPOINT , TIMEOUT );
154
158
155
159
// Assert
156
160
String deleteFeaturestoreResponse = bout .toString ();
@@ -174,7 +178,7 @@ public void testFeatureValuesSamples()
174
178
String tempUuid = UUID .randomUUID ().toString ().replaceAll ("-" , "_" ).substring (0 , 23 );
175
179
String id = String .format ("temp_feature_values_samples_test_%s" , tempUuid );
176
180
CreateFeaturestoreSample .createFeaturestoreSample (
177
- PROJECT_ID , id , MIN_NODE_COUNT , MAX_NODE_COUNT , LOCATION , ENDPOINT , 900 );
181
+ PROJECT_ID , id , MIN_NODE_COUNT , MAX_NODE_COUNT , LOCATION , ENDPOINT , TIMEOUT );
178
182
179
183
// Assert
180
184
String createFeaturestoreResponse = bout .toString ();
@@ -186,7 +190,7 @@ public void testFeatureValuesSamples()
186
190
// Create the entity type
187
191
String entityTypeId = "movies" ;
188
192
CreateEntityTypeSample .createEntityTypeSample (
189
- PROJECT_ID , featurestoreId , entityTypeId , DESCRIPTION , LOCATION , ENDPOINT , 900 );
193
+ PROJECT_ID , featurestoreId , entityTypeId , DESCRIPTION , LOCATION , ENDPOINT , TIMEOUT );
190
194
191
195
// Assert
192
196
String createEntityTypeResponse = bout .toString ();
@@ -204,7 +208,7 @@ public void testFeatureValuesSamples()
204
208
VALUE_TYPE ,
205
209
LOCATION ,
206
210
ENDPOINT ,
207
- 900 );
211
+ TIMEOUT );
208
212
209
213
// Assert
210
214
String createFeatureResponse = bout .toString ();
@@ -250,7 +254,7 @@ public void testFeatureValuesSamples()
250
254
251
255
// Delete the feature
252
256
DeleteFeatureSample .deleteFeatureSample (
253
- PROJECT_ID , featurestoreId , entityTypeId , featureId , LOCATION , ENDPOINT , 300 );
257
+ PROJECT_ID , featurestoreId , entityTypeId , featureId , LOCATION , ENDPOINT , TIMEOUT );
254
258
255
259
// Assert
256
260
String deleteFeatureResponse = bout .toString ();
0 commit comments