Skip to content

Commit b238934

Browse files
committed
bug fix for assertEquals()
1 parent 56479fd commit b238934

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ public void testPrintTopologyTextFormat() throws Exception {
110110
assertTrue(topology.contains("/ns1/rack6"));
111111

112112
// assert node number
113-
assertEquals(topology.split("127.0.0.1").length - 1,
114-
18);
113+
assertEquals(18,
114+
topology.split("127.0.0.1").length - 1);
115115
}
116116

117117
@Test
@@ -136,7 +136,7 @@ public void testPrintTopologyJsonFormat() throws Exception {
136136
JsonNode racks = new ObjectMapper().readTree(topology);
137137

138138
// assert rack number
139-
assertEquals(racks.size(), 6);
139+
assertEquals(6, racks.size());
140140

141141
// assert rack info
142142
assertTrue(topology.contains("/ns0/rack1"));
@@ -156,7 +156,7 @@ public void testPrintTopologyJsonFormat() throws Exception {
156156
dataNodesCount += fields.next().getValue().size();
157157
}
158158
}
159-
assertEquals(dataNodesCount, 18);
159+
assertEquals(18, dataNodesCount);
160160
}
161161

162162
@Test

0 commit comments

Comments
 (0)