File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -97,8 +97,6 @@ public static QueuedResource createQueuedResource(
9797 .setQueuedResource (queuedResource )
9898 .build ();
9999
100- // You can wait until TPU Node is READY,
101- // and check its status using getTpuVm() from "tpu_vm_get" sample.
102100 return tpuClient .createQueuedResourceAsync (request ).get ();
103101 }
104102 }
Original file line number Diff line number Diff line change @@ -140,7 +140,9 @@ public void testCreateQueuedResourceWithStartupScript() throws Exception {
140140 @ Test
141141 public void testCreateSpotQueuedResource () throws Exception {
142142 try (MockedStatic <TpuClient > mockedTpuClient = mockStatic (TpuClient .class )) {
143- QueuedResource mockQueuedResource = mock (QueuedResource .class );
143+ QueuedResource mockQueuedResource = QueuedResource .newBuilder ()
144+ .setName ("QueuedResourceName" )
145+ .build ();
144146 TpuClient mockTpuClient = mock (TpuClient .class );
145147 OperationFuture mockFuture = mock (OperationFuture .class );
146148
@@ -157,7 +159,7 @@ public void testCreateSpotQueuedResource() throws Exception {
157159 verify (mockTpuClient , times (1 ))
158160 .createQueuedResourceAsync (any (CreateQueuedResourceRequest .class ));
159161 verify (mockFuture , times (1 )).get ();
160- assertEquals (returnedQueuedResource , mockQueuedResource );
162+ assertEquals (returnedQueuedResource . getName () , mockQueuedResource . getName () );
161163 }
162164 }
163165}
You can’t perform that action at this time.
0 commit comments