提交 346e7a71 编写于 作者: H HTHou 提交者: Jialin Qiao

add a test

上级 8c252dec
......@@ -21,7 +21,6 @@ package org.apache.iotdb.db.integration;
import org.apache.iotdb.db.conf.IoTDBDescriptor;
import org.apache.iotdb.db.exception.metadata.MetadataException;
import org.apache.iotdb.db.metadata.MManager;
import org.apache.iotdb.db.metadata.mnode.MNode;
import org.apache.iotdb.db.metadata.mnode.MeasurementMNode;
import org.apache.iotdb.db.utils.EnvironmentUtils;
import org.apache.iotdb.jdbc.Config;
......@@ -485,4 +484,24 @@ public class IoTDBSimpleQueryIT {
}
}
@Test
public void testTimeseriesMetadataCache() throws ClassNotFoundException {
Class.forName(Config.JDBC_DRIVER_NAME);
try (Connection connection = DriverManager
.getConnection(Config.IOTDB_URL_PREFIX + "127.0.0.1:6667/",
"root", "root");
Statement statement = connection.createStatement()) {
statement.execute("SET STORAGE GROUP TO root.sg1");
for (int i = 0; i < 10000; i++) {
statement.execute("CREATE TIMESERIES root.sg1.d0.s"+ i + " WITH DATATYPE=INT32,ENCODING=PLAIN");
}
for (int i = 1; i < 10000; i++) {
statement.execute("INSERT INTO root.sg1.d0(timestamp, s" + i + ") VALUES (1000, 1)");
}
statement.execute("flush");
statement.executeQuery("select s0 from root.sg1.d0");
} catch (SQLException e) {
fail();
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册