Skip to content

Commit 73d8baa

Browse files
committed
fix checkstyle
1 parent 85599bd commit 73d8baa

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterNetworkTopologyServlet.java

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -184,28 +184,28 @@ public void testPrintTopologyNoDatanodesTextFormat() throws Exception {
184184
assertTrue(topology.contains("No DataNodes"));
185185
}
186186

187-
@Test
188-
public void testPrintTopologyNoDatanodesJsonFormat() throws Exception {
189-
// get http Address
190-
String httpAddress = clusterNoDatanodes.getRandomRouter().getRouter()
191-
.getHttpServerAddress().toString();
192-
193-
// send http request
194-
URL url = new URL("http:/" + httpAddress + "/topology");
195-
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
196-
conn.setReadTimeout(20000);
197-
conn.setConnectTimeout(20000);
198-
conn.setRequestProperty("Accept", "application/json");
199-
conn.connect();
200-
ByteArrayOutputStream out = new ByteArrayOutputStream();
201-
IOUtils.copyBytes(conn.getInputStream(), out, 4096, true);
202-
StringBuilder sb =
203-
new StringBuilder("-- Network Topology -- \n");
204-
sb.append(out);
205-
sb.append("\n-- Network Topology -- ");
206-
String topology = sb.toString();
207-
208-
// assert node number
209-
assertTrue(topology.contains("No DataNodes"));
210-
}
187+
@Test
188+
public void testPrintTopologyNoDatanodesJsonFormat() throws Exception {
189+
// get http Address
190+
String httpAddress = clusterNoDatanodes.getRandomRouter().getRouter()
191+
.getHttpServerAddress().toString();
192+
193+
// send http request
194+
URL url = new URL("http:/" + httpAddress + "/topology");
195+
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
196+
conn.setReadTimeout(20000);
197+
conn.setConnectTimeout(20000);
198+
conn.setRequestProperty("Accept", "application/json");
199+
conn.connect();
200+
ByteArrayOutputStream out = new ByteArrayOutputStream();
201+
IOUtils.copyBytes(conn.getInputStream(), out, 4096, true);
202+
StringBuilder sb =
203+
new StringBuilder("-- Network Topology -- \n");
204+
sb.append(out);
205+
sb.append("\n-- Network Topology -- ");
206+
String topology = sb.toString();
207+
208+
// assert node number
209+
assertTrue(topology.contains("No DataNodes"));
210+
}
211211
}

0 commit comments

Comments
 (0)