@Test
  public void testRemoteDatabase() throws Throwable {
    final String connector_name1 = "test_connector1";
    final String mysql_type = "mysql";
    final String mysql_url = "jdbc:mysql://nightly1.apache.org:3306/hive1";
    final String db_name = "mysql_remote";
    final String db2 = "mysql_dup";

    try {
      DataConnector connector = new DataConnector(connector_name1, mysql_type, mysql_url);
      Map<String, String> params = new HashMap<>();
      params.put(AbstractJDBCConnectorProvider.JDBC_USERNAME, "hive");
      params.put(AbstractJDBCConnectorProvider.JDBC_PASSWORD, "hive");
      connector.setParameters(params);
      client.createDataConnector(connector);

      DataConnector dConn = client.getDataConnector(connector_name1);
      new DatabaseBuilder().setName(db_name).setType(DatabaseType.REMOTE).setConnectorName(connector_name1)
          .setRemoteDBName(db_name).create(client, conf);

      Database db = client.getDatabase(db_name);
      assertNotNull(db);
      assertEquals(db.getType(), DatabaseType.REMOTE);
      assertEquals(db.getConnector_name(), connector_name1);
      assertEquals(db.getRemote_dbname(), db_name);

      // new db in hive pointing to same remote db.
      new DatabaseBuilder().setName(db2).setType(DatabaseType.REMOTE).setConnectorName(connector_name1)
          .setRemoteDBName(db_name).create(client, conf);

      db = client.getDatabase(db2);
      assertNotNull(db);
      assertEquals(db.getType(), DatabaseType.REMOTE);
      assertEquals(db.getConnector_name(), connector_name1);
      assertEquals(db.getRemote_dbname(), db_name);

      client.dropDataConnector(connector_name1, false, false);
      client.dropDatabase(db_name);
      client.dropDatabase(db2);
    } catch (Throwable e) {
      System.err.println(StringUtils.stringifyException(e));
      System.err.println("testRemoteDatabase() failed.");
      throw e;
    }
  }
While altering partition(s), verify DO NOT calculate partition statistics if
<ol>
  <li>table property DO_NOT_UPDATE_STATS is true</li>
  <li>STATS_AUTO_GATHER is false</li>
  <li>Is View</li>
</ol>
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java