Skip to content

Commit 9b219c0

Browse files
authored
fix: removes unneeded test, extends timeout (#9841)
* fix: removes unneeded test, extends timeout * marking tests as Ignore
1 parent 66f1c62 commit 9b219c0

File tree

3 files changed

+15
-74
lines changed

3 files changed

+15
-74
lines changed

automl/src/test/java/com/google/cloud/translate/automl/DatasetApiIT.java

Lines changed: 0 additions & 73 deletions
This file was deleted.

batch/snippets/src/test/java/com/example/batch/CreateResourcesIT.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import org.junit.AfterClass;
3737
import org.junit.Assert;
3838
import org.junit.BeforeClass;
39+
import org.junit.Ignore;
3940
import org.junit.Test;
4041
import org.junit.runner.RunWith;
4142
import org.junit.runners.JUnit4;
@@ -135,6 +136,7 @@ private static void safeDeleteJob(String jobName) {
135136
}
136137
}
137138

139+
@Ignore("Canceling jobs not yet GA")
138140
@Test
139141
public void createBatchCustomServiceAccountTest()
140142
throws IOException, ExecutionException, InterruptedException, TimeoutException {
@@ -148,6 +150,7 @@ public void createBatchCustomServiceAccountTest()
148150
Assert.assertNotNull(job.getAllocationPolicy().getServiceAccount().getEmail());
149151
}
150152

153+
@Ignore("Canceling jobs not yet GA")
151154
@Test
152155
public void createBatchUsingSecretManager()
153156
throws IOException, ExecutionException, InterruptedException, TimeoutException {
@@ -164,6 +167,7 @@ public void createBatchUsingSecretManager()
164167
-> taskGroup.getTaskSpec().getEnvironment().containsSecretVariables(variableName)));
165168
}
166169

170+
@Ignore("Canceling jobs not yet GA")
167171
@Test
168172
public void createGpuJobTest()
169173
throws IOException, ExecutionException, InterruptedException, TimeoutException {
@@ -181,6 +185,7 @@ public void createGpuJobTest()
181185
-> instance.getPolicy().getMachineType().contains(machineType)));
182186
}
183187

188+
@Ignore("Canceling jobs not yet GA")
184189
@Test
185190
public void createGpuJobN1Test()
186191
throws IOException, ExecutionException, InterruptedException, TimeoutException {
@@ -199,6 +204,7 @@ public void createGpuJobN1Test()
199204
-> accelerator.getType().contains(gpuType) && accelerator.getCount() == count)));
200205
}
201206

207+
@Ignore("Canceling jobs not yet GA")
202208
@Test
203209
public void createLocalSsdJobTest()
204210
throws IOException, ExecutionException, InterruptedException, TimeoutException {
@@ -217,6 +223,7 @@ public void createLocalSsdJobTest()
217223
-> attachedDisk.getDeviceName().contains(LOCAL_SSD_NAME))));
218224
}
219225

226+
@Ignore("Canceling jobs not yet GA")
220227
@Test
221228
public void createPersistentDiskJobTest()
222229
throws IOException, ExecutionException, InterruptedException, TimeoutException {
@@ -243,6 +250,7 @@ public void createPersistentDiskJobTest()
243250
-> attachedDisk.getDeviceName().contains(NEW_PERSISTENT_DISK_NAME))));
244251
}
245252

253+
@Ignore("Canceling jobs not yet GA")
246254
@Test
247255
public void createBatchNotificationTest()
248256
throws IOException, ExecutionException, InterruptedException, TimeoutException {
@@ -263,6 +271,7 @@ public void createBatchNotificationTest()
263271
&& jobNotification.getMessage().getNewTaskState() == State.FAILED));
264272
}
265273

274+
@Ignore("Canceling jobs not yet GA")
266275
@Test
267276
public void createBatchCustomEventTest()
268277
throws IOException, ExecutionException, InterruptedException, TimeoutException {
@@ -284,6 +293,7 @@ public void createBatchCustomEventTest()
284293
.anyMatch(runnable -> runnable.getDisplayName().equals(displayName))));
285294
}
286295

296+
@Ignore("Canceling jobs not yet GA")
287297
@Test
288298
public void createScriptJobWithNfsTest()
289299
throws IOException, ExecutionException, InterruptedException, TimeoutException {
@@ -303,6 +313,7 @@ public void createScriptJobWithNfsTest()
303313
.anyMatch(volume -> volume.getNfs().getServer().equals(NFS_IP_ADDRESS))));
304314
}
305315

316+
@Ignore("Canceling jobs not yet GA")
306317
@Test
307318
public void createBatchLabelJobTest()
308319
throws IOException, ExecutionException, InterruptedException, TimeoutException {
@@ -324,6 +335,7 @@ public void createBatchLabelJobTest()
324335
Assert.assertTrue(job.getLabelsMap().containsValue(labelValue2));
325336
}
326337

338+
@Ignore("Canceling jobs not yet GA")
327339
@Test
328340
public void createBatchCustomNetworkTest()
329341
throws IOException, ExecutionException, InterruptedException, TimeoutException {
@@ -346,6 +358,7 @@ public void createBatchCustomNetworkTest()
346358
.anyMatch(AllocationPolicy.NetworkInterface::getNoExternalIpAddress));
347359
}
348360

361+
@Ignore("Canceling jobs not yet GA")
349362
@Test
350363
public void createJobWithAllocationPolicyLabelTest()
351364
throws IOException, ExecutionException, InterruptedException, TimeoutException {
@@ -368,6 +381,7 @@ public void createJobWithAllocationPolicyLabelTest()
368381
Assert.assertTrue(job.getAllocationPolicy().getLabelsMap().containsValue(labelValue2));
369382
}
370383

384+
@Ignore("Canceling jobs not yet GA")
371385
@Test
372386
public void createBatchRunnableLabelTest()
373387
throws IOException, ExecutionException, InterruptedException, TimeoutException {

batch/snippets/src/test/java/com/example/batch/Util.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public static void waitForJobCompletion(Job job)
109109
String[] jobName = job.getName().split("/");
110110
Instant startTime = Instant.now();
111111
while (WAIT_STATES.contains(job.getStatus().getState())) {
112-
if (Instant.now().getEpochSecond() - startTime.getEpochSecond() > 900) {
112+
if (Instant.now().getEpochSecond() - startTime.getEpochSecond() > 1200) {
113113
throw new Error("Timed out waiting for operation to complete.");
114114
}
115115
job = getJob(jobName[1], jobName[3], jobName[5]);

0 commit comments

Comments
 (0)