Skip to content

Commit aac01ca

Browse files
committed
[FOLLOWUP][SPARK-32121][SHUFFLE][TEST] code style
1 parent 56f3be5 commit aac01ca

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

common/network-shuffle/src/test/java/org/apache/spark/network/shuffle/ExternalShuffleBlockResolverSuite.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -148,19 +148,17 @@ public void jsonSerializationOfExecutorRegistration() throws IOException {
148148
@Test
149149
public void testNormalizeAndInternPathname() {
150150
String sep = File.separator;
151-
String expectedPathname1 = sep + "foo" + sep + "bar" + sep + "baz";
152-
String expectedPathname2 = "foo" + sep + "bar" + sep + "baz";
153-
String expectedPathname3 = sep + "foo\\" + sep + "bar" + sep + "baz";
154-
assertPathsMatch("/foo", "bar", "baz", expectedPathname1);
155-
assertPathsMatch("//foo/", "bar/", "//baz", expectedPathname1);
156-
assertPathsMatch("foo", "bar", "baz///", expectedPathname2);
157-
assertPathsMatch("/foo/", "/bar//", "/baz", expectedPathname1);
151+
String expectedPathname = sep + "foo" + sep + "bar" + sep + "baz";
152+
assertPathsMatch("/foo", "bar", "baz", expectedPathname);
153+
assertPathsMatch("//foo/", "bar/", "//baz", expectedPathname);
154+
assertPathsMatch("/foo/", "/bar//", "/baz", expectedPathname);
155+
assertPathsMatch("foo", "bar", "baz///", "foo" + sep + "bar" + sep + "baz");
158156
assertPathsMatch("/", "", "", sep);
159157
assertPathsMatch("/", "/", "/", sep);
160158
if (SystemUtils.IS_OS_WINDOWS) {
161-
assertPathsMatch("/foo\\/", "bar", "baz", expectedPathname1);
159+
assertPathsMatch("/foo\\/", "bar", "baz", expectedPathname);
162160
} else {
163-
assertPathsMatch("/foo\\/", "bar", "baz", expectedPathname3);
161+
assertPathsMatch("/foo\\/", "bar", "baz", sep + "foo\\" + sep + "bar" + sep + "baz");
164162
}
165163
}
166164

0 commit comments

Comments
 (0)