private void testSelectAll() {
    String selectSql = "select * from t";

    try (Connection connection = EnvFactory.getEnv().getConnection(BaseEnv.TABLE_SQL_DIALECT);
        Statement statement = connection.createStatement()) {
      statement.execute("use \"test\"");
      Map<String, Long> lastTimeMap = new HashMap<>();
      try (ResultSet resultSet = statement.executeQuery(selectSql)) {
        int cnt = 0;
        while (resultSet.next()) {
          String tag = resultSet.getString("tag1") + "_" + resultSet.getString("tag2");
          long before = lastTimeMap.getOrDefault(tag, -1L);
          long cur = resultSet.getTimestamp("time").getTime();
          if (cur <= before) {
            fail("time order wrong!");
          }
          lastTimeMap.put(tag, cur);
          cnt++;
        }
        assertEquals(16030, cnt);
      }
    } catch (Exception e) {
      e.printStackTrace();
      fail(e.getMessage());
    }
  }
Notice that, all test begins with "IoTDB" is integration test. All test which will start the
IoTDB server should be defined as integration test.
integration-test/src/test/java/org/apache/iotdb/relational/it/db/it/IoTDBMultiDeviceTableIT.java