[ https://issues.apache.org/jira/browse/HBASE-6414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13432258#comment-13432258 ]
Zhihong Ted Yu commented on HBASE-6414: --------------------------------------- With the following proposed change, I ran TestHMasterRPCException#testRPCException 9 times and it passed: {code} Index: hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java =================================================================== --- hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java (revision 1371504) +++ hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestHMasterRPCException.java (working copy) @@ -23,18 +23,20 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import java.io.IOException; import java.net.InetSocketAddress; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.ipc.HBaseRPC; import org.apache.hadoop.hbase.MasterMonitorProtocol; -import org.apache.hadoop.hbase.protobuf.RequestConverter; -import org.apache.hadoop.ipc.RemoteException; -import org.apache.hadoop.hbase.ipc.ServerNotRunningYetException; +import org.apache.hadoop.hbase.protobuf.ProtobufUtil; +import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.IsMasterRunningRequest; import org.junit.Test; import org.junit.experimental.categories.Category; +import com.google.protobuf.ServiceException; + @Category(MediumTests.class) public class TestHMasterRPCException { @@ -52,9 +54,12 @@ try { MasterMonitorProtocol inf = (MasterMonitorProtocol) HBaseRPC.getProxy( MasterMonitorProtocol.class, MasterMonitorProtocol.VERSION, isa, conf, 100); + Thread.sleep(500); + inf.isMasterRunning(null, IsMasterRunningRequest.getDefaultInstance()); fail(); - } catch (ServerNotRunningYetException ex) { - assertTrue(ex.getMessage().startsWith( + } catch (ServiceException ex) { + IOException ie = ProtobufUtil.getRemoteException(ex); + assertTrue(ie.getMessage(), ie.getMessage().startsWith( "org.apache.hadoop.hbase.ipc.ServerNotRunningYetException: Server is not running yet")); } catch (Throwable t) { fail("Unexpected throwable: " + t); {code} > Remove the WritableRpcEngine & associated Invocation classes > ------------------------------------------------------------ > > Key: HBASE-6414 > URL: https://issues.apache.org/jira/browse/HBASE-6414 > Project: HBase > Issue Type: Improvement > Affects Versions: 0.96.0 > Reporter: Devaraj Das > Assignee: Devaraj Das > Fix For: 0.96.0 > > Attachments: 6414-1.patch.txt, 6414-3.patch.txt, 6414-4.patch.txt, > 6414-4.patch.txt, 6414-initial.patch.txt, 6414-initial.patch.txt > > > Remove the WritableRpcEngine & Invocation classes once HBASE-5705 gets > committed and all the protocols are rebased to use PB. > Raising this jira in advance.. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira