3939
4040@ RunWith (JUnit4 .class )
4141@ Timeout (value = 15 , unit = TimeUnit .MINUTES )
42- @ TestMethodOrder (MethodOrderer . OrderAnnotation . class )
42+ @ TestMethodOrder (MethodOrderer .OrderAnnotation .class )
4343public class TpuVmIT {
4444 private static final String PROJECT_ID = System .getenv ("GOOGLE_CLOUD_PROJECT" );
4545 private static final String ZONE = "us-central1-c" ;
46- static String javaVersion = System .getProperty ("java.version" ).substring (0 , 2 );
47- private static final String NODE_NAME = "test-tpu-" + javaVersion + "-"
48- + UUID .randomUUID ().toString ().substring (0 , 8 );
46+ private static final String NODE_NAME = "test-tpu-" + UUID .randomUUID ();
4947 private static final String TPU_TYPE = "v2-8" ;
5048 private static final String TPU_SOFTWARE_VERSION = "tpu-vm-base" ;
5149 private static final String NODE_PATH_NAME =
@@ -57,20 +55,16 @@ public static void requireEnvVar(String envVarName) {
5755 }
5856
5957 @ BeforeAll
60- public static void setUp ()
61- throws IOException , ExecutionException , InterruptedException {
58+ public static void setUp () {
6259 requireEnvVar ("GOOGLE_APPLICATION_CREDENTIALS" );
6360 requireEnvVar ("GOOGLE_CLOUD_PROJECT" );
64-
65- // Cleanup existing stale resources.
66- Util .cleanUpExistingTpu ("test-tpu-" + javaVersion , PROJECT_ID , ZONE );
6761 }
6862
6963 @ AfterAll
7064 public static void cleanup () throws Exception {
7165 DeleteTpuVm .deleteTpuVm (PROJECT_ID , ZONE , NODE_NAME );
7266
73- // Test that TPUs is deleted
67+ // Test that TPUs are deleted
7468 Assertions .assertThrows (
7569 NotFoundException .class ,
7670 () -> GetTpuVm .getTpuVm (PROJECT_ID , ZONE , NODE_NAME ));
@@ -79,7 +73,6 @@ public static void cleanup() throws Exception {
7973 @ Test
8074 @ Order (1 )
8175 public void testCreateTpuVm () throws IOException , ExecutionException , InterruptedException {
82-
8376 Node node = CreateTpuVm .createTpuVm (
8477 PROJECT_ID , ZONE , NODE_NAME , TPU_TYPE , TPU_SOFTWARE_VERSION );
8578
0 commit comments