Skip to content

Commit 7c47e46

Browse files
Fix tests
1 parent 73a3f9c commit 7c47e46

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AFileSystemIsolatedClassloader.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,29 @@ public static class CustomClassLoader extends ClassLoader {
1313
private final ClassLoader classLoader = new CustomClassLoader();
1414

1515
@Test
16-
void isolatedClasspath() throws IOException {
16+
public void isolatedClasspath() throws IOException {
1717
try (S3AFileSystem fs = new S3AFileSystem()) {
1818
Configuration conf = new Configuration();
1919
conf.setBoolean(Constants.AWS_S3_EXTENSIONS_ISOLATED_CLASSLOADER, true);
2020
fs.isolateClassloader(conf, classLoader);
21-
Assert.assertFalse(conf.getClassLoader() instanceof CustomClassLoader);
21+
Assert.assertTrue(conf.getClassLoader() instanceof CustomClassLoader);
2222
}
2323
}
2424

2525
@Test
26-
void isolatedClasspathDefault() throws IOException {
26+
public void isolatedClasspathDefault() throws IOException {
2727
try (S3AFileSystem fs = new S3AFileSystem()) {
2828
Configuration conf = new Configuration();
29-
conf.setBoolean(Constants.AWS_S3_EXTENSIONS_ISOLATED_CLASSLOADER, false);
3029
fs.isolateClassloader(conf, classLoader);
31-
Assert.assertFalse(conf.getClassLoader() instanceof CustomClassLoader);
30+
Assert.assertTrue(conf.getClassLoader() instanceof CustomClassLoader);
3231
}
3332
}
3433

3534
@Test
36-
void notIsolatedClasspath() throws IOException {
35+
public void notIsolatedClasspath() throws IOException {
3736
try (S3AFileSystem fs = new S3AFileSystem()) {
3837
Configuration conf = new Configuration();
38+
conf.setBoolean(Constants.AWS_S3_EXTENSIONS_ISOLATED_CLASSLOADER, false);
3939
fs.isolateClassloader(conf, classLoader);
4040
Assert.assertFalse(conf.getClassLoader() instanceof CustomClassLoader);
4141
}

0 commit comments

Comments
 (0)