@Test
  public void testGetThriftServerOneType() throws Exception {

    // start a thrift server
    HBaseThriftTestingUtility THRIFT_TEST_UTIL = new HBaseThriftTestingUtility();

    LOG.info("Starting HBase Thrift server One");
    THRIFT_TEST_UTIL.startThriftServer(UTIL.getConfiguration(), ThriftServerType.ONE);
    try (TTransport transport =
      new TSocket(InetAddress.getLocalHost().getHostName(), THRIFT_TEST_UTIL.getServerPort())) {
      TProtocol protocol = new TBinaryProtocol(transport);
      // This is our thrift2 client.
      THBaseService.Iface client = new THBaseService.Client(protocol);
      // open the transport
      transport.open();
      assertEquals(TThriftServerType.ONE.name(), client.getThriftServerType().name());
    } finally {
      THRIFT_TEST_UTIL.stopThriftServer();
    }
  }
Verify that thrift2 client calling thrift server can get the thrift server type correctly.
hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java