public static void dropCatalogCascade(IMetaStoreClient client, String catName) throws TException {
    if (catName != null && !catName.equals(DEFAULT_CATALOG_NAME)) {
      List<String> databases = client.getAllDatabases(catName);
      for (String db : databases) {
        client.dropDatabase(catName, db, true, false, true);
      }
      client.dropCatalog(catName);
    }
  }
There is no cascade option for dropping a catalog for security reasons.  But this in
inconvenient in tests, so this method does it.
@param client metastore client
@param catName catalog to drop, cannot be the default catalog
@throws TException from underlying client calls
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/MetaStoreTestUtils.java