Skip to content

Commit ef2891e

Browse files
Apache9Jenkins
authored andcommitted
HBASE-27865 TestThriftServerCmdLine fails with org.apache.hadoop.hbase.SystemExitRule (apache#5238)
Signed-off-by: Liangjun He <[email protected]> Signed-off-by: Xin Sun <[email protected]> (cherry picked from commit fd4f984) (cherry picked from commit 4169b61) Change-Id: Ic916377969fb3501b15fd18215f34a69b9bcb5bd
1 parent c96e7cf commit ef2891e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -832,9 +832,9 @@ public int run(String[] strings) throws Exception {
832832
} else {
833833
setupServer();
834834
}
835-
serviceUGI.doAs(new PrivilegedAction<Object>() {
835+
return serviceUGI.doAs(new PrivilegedAction<Integer>() {
836836
@Override
837-
public Object run() {
837+
public Integer run() {
838838
try {
839839
startInfoServer();
840840
if (httpEnabled) {
@@ -843,15 +843,13 @@ public Object run() {
843843
} else {
844844
tserver.serve();
845845
}
846+
return 0;
846847
} catch (Exception e) {
847848
LOG.error(HBaseMarkers.FATAL, "Cannot run ThriftServer", e);
848-
849-
System.exit(-1);
849+
return -1;
850850
}
851-
return null;
852851
}
853852
});
854-
return 0;
855853
}
856854

857855
public static void main(String[] args) throws Exception {

0 commit comments

Comments
 (0)