@Override
    public ScheduledQueryPollResponse call() throws Exception {
      IMetaStoreClient client1 = null;
      try {
        client1 = metaStore.getClient();
        ScheduledQueryPollRequest request = new ScheduledQueryPollRequest();
        request.setClusterNamespace(ns);
        ScheduledQueryPollResponse pollResult = null;
        pollResult = client1.scheduledQueryPoll(request);
        return pollResult;
      } catch (TException e) {
        throw new RuntimeException(e);
      } finally {
        if (client1 != null) {
          client1.close();
        }
      }

    }
Tests handling of scheduled queries related calls to the metastore.

Checks whether expected state changes are being done to the HMS database.
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestMetastoreScheduledQueries.java