Skip to content

Commit ea589d0

Browse files
Fixed test
1 parent ddb7ed9 commit ea589d0

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

tpu/src/test/java/tpu/CreateSpotQueuedResourceIT.java

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,12 @@
1616

1717
package tpu;
1818

19-
import static com.google.common.truth.Truth.assertThat;
2019
import static com.google.common.truth.Truth.assertWithMessage;
2120
import static org.junit.Assert.assertTrue;
2221

2322
import com.google.api.gax.rpc.NotFoundException;
2423
import com.google.cloud.tpu.v2alpha1.QueuedResource;
25-
import java.io.ByteArrayOutputStream;
2624
import java.io.IOException;
27-
import java.io.PrintStream;
2825
import java.util.UUID;
2926
import java.util.concurrent.TimeUnit;
3027
import org.junit.jupiter.api.AfterAll;
@@ -75,23 +72,11 @@ public static void cleanup() {
7572

7673
@Test
7774
public void testGetSpotQueuedResource() throws Exception {
78-
final PrintStream out = System.out;
79-
ByteArrayOutputStream stdOut = new ByteArrayOutputStream();
80-
System.setOut(new PrintStream(stdOut));
81-
8275
QueuedResource queuedResource = CreateSpotQueuedResource.createQueuedResource(
83-
PROJECT_ID,
84-
ZONE,
85-
QUEUED_RESOURCE_NAME,
86-
NODE_NAME,
87-
TPU_TYPE,
88-
TPU_SOFTWARE_VERSION);
76+
PROJECT_ID, ZONE, QUEUED_RESOURCE_NAME,
77+
NODE_NAME, TPU_TYPE, TPU_SOFTWARE_VERSION);
8978

90-
assertThat(stdOut.toString()).contains("Queued Resource created: " + QUEUED_RESOURCE_NAME);
9179
assertTrue(queuedResource.getTpu().getNodeSpec(0).getNode()
9280
.getSchedulingConfig().getPreemptible());
93-
94-
stdOut.close();
95-
System.setOut(out);
9681
}
9782
}

0 commit comments

Comments
 (0)