@Test
  public void testExecuteReturnWithInfoMessage() throws Exception {
    TTransport transport = HiveAuthUtils.getSocketTransport(host, cliPort, 0);
    try {
      transport.open();
      TCLIService.Iface client = new TCLIService.Client(new TBinaryProtocol(transport));
      TOpenSessionReq openReq = new TOpenSessionReq();
      openReq.setClient_protocol(TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V11);
      TOpenSessionResp sessionResp = client.OpenSession(openReq);

      Map<String, String> serverHiveConf = sessionResp.getConfiguration();
      assertNotNull(serverHiveConf);
      assertTrue(Boolean.parseBoolean(serverHiveConf.get(ConfVars.HIVE_DEFAULT_NULLS_LAST.varname)));

      TSessionHandle sessHandle = sessionResp.getSessionHandle();
      TExecuteStatementReq execReq = new TExecuteStatementReq(sessHandle, "select 1");
      execReq.setRunAsync(true);
      TExecuteStatementResp execResp = client.ExecuteStatement(execReq);
      TStatus status = execResp.getStatus();
      assertTrue(status.getStatusCode() == TStatusCode.SUCCESS_WITH_INFO_STATUS);
      assertNotNull(status.getInfoMessages());
      assertTrue(status.getInfoMessages().size() > 0);
      Pattern pattern = Pattern.compile("http://.*:(\\d+)/query_page\\.html\\?operationId=(.+)$");
      Matcher matcher = pattern.matcher(status.getInfoMessages().get(0));
      assertTrue(matcher.find());
      assertEquals(webuiPort + "", matcher.group(1));
      OperationHandle operationHandle = new OperationHandle(execResp.getOperationHandle());
      assertEquals(operationHandle.getHandleIdentifier().toString(), matcher.group(2));
      // Cancel the operation
      TCancelOperationReq cancelReq = new TCancelOperationReq();
      cancelReq.setOperationHandle(execResp.getOperationHandle());
      client.CancelOperation(cancelReq);

      // Disable showing the link
      Map<String, String> overlayConf = new HashMap<>();
      overlayConf.put(ConfVars.HIVE_SERVER2_SHOW_OPERATION_DRILLDOWN_LINK.varname, "false");
      execReq = new TExecuteStatementReq(sessHandle, "select 1");
      execReq.setRunAsync(true);
      execReq.setConfOverlay(overlayConf);
      execResp = client.ExecuteStatement(execReq);
      status = execResp.getStatus();
      assertTrue(status.getStatusCode() == TStatusCode.SUCCESS_STATUS);
      assertTrue(status.getInfoMessages() == null);
    } finally {
      transport.close();
    }
  }
Test operation's drilldown link is presented on TStatus when enabled.
itests/hive-unit/src/test/java/org/apache/hive/service/cli/thrift/TestThriftCliServiceWithInfoMessage.java