Skip to content

Commit cef6e3b

Browse files
committed
HBASE-26666. Fix unit tests
1 parent 17091e8 commit cef6e3b

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/TestNettyRpcConnection.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@
2121
import static org.hamcrest.MatcherAssert.assertThat;
2222
import static org.junit.Assert.assertThrows;
2323
import static org.junit.Assert.fail;
24-
2524
import java.io.IOException;
2625
import java.lang.reflect.InvocationTargetException;
2726
import java.lang.reflect.Method;
2827
import java.lang.reflect.Modifier;
28+
import java.util.HashSet;
29+
import java.util.Set;
2930
import org.apache.hadoop.hbase.HBaseClassTestRule;
3031
import org.apache.hadoop.hbase.HBaseConfiguration;
3132
import org.apache.hadoop.hbase.net.Address;
@@ -39,7 +40,6 @@
3940
import org.junit.experimental.categories.Category;
4041
import org.slf4j.Logger;
4142
import org.slf4j.LoggerFactory;
42-
4343
import org.apache.hbase.thirdparty.com.google.common.io.Closeables;
4444

4545
@Category({ ClientTests.class, SmallTests.class })
@@ -73,8 +73,18 @@ public void testPrivateMethodExecutedInEventLoop() throws IllegalAccessException
7373
assertThrows(AssertionError.class, () -> {
7474
assert false;
7575
});
76+
77+
final Set<String> methodsToCheck = new HashSet<>();
78+
methodsToCheck.add("shutdown0");
79+
methodsToCheck.add("sendRequest0");
80+
methodsToCheck.add("connect");
81+
7682
for (Method method : NettyRpcConnection.class.getDeclaredMethods()) {
7783
if (Modifier.isPrivate(method.getModifiers()) && !method.getName().contains("$")) {
84+
if (!methodsToCheck.contains(method.getName())) {
85+
LOG.info("skipping {}", method);
86+
continue;
87+
}
7888
LOG.info("checking {}", method);
7989
method.setAccessible(true);
8090
// all private methods should be called inside the event loop thread, so calling it from

hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/tls/TestX509Util.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ public void cleanUp() {
9999
System.clearProperty("com.sun.security.enableCRLDP");
100100
Security.setProperty("ocsp.enable", Boolean.FALSE.toString());
101101
Security.setProperty("com.sun.security.enableCRLDP", Boolean.FALSE.toString());
102-
x509Util.close();
103102
}
104103

105104
@Test

0 commit comments

Comments
 (0)