use of io.questdb.griffin.model.RuntimeIntervalModel in project questdb by bluestreak01.
the class IntervalBwdDataFrameCursorTest method testClose.
@Test
public void testClose() throws Exception {
TestUtils.assertMemoryLeak(() -> {
try (TableModel model = new TableModel(configuration, "x", PartitionBy.NONE).col("a", ColumnType.INT).col("b", ColumnType.INT).timestamp()) {
CairoTestUtils.create(model);
}
TableReader reader = new TableReader(configuration, "x");
IntervalBwdDataFrameCursor cursor = new IntervalBwdDataFrameCursor(new RuntimeIntervalModel(intervals), reader.getMetadata().getTimestampIndex());
cursor.of(reader, null);
cursor.close();
Assert.assertFalse(reader.isOpen());
cursor.close();
Assert.assertFalse(reader.isOpen());
});
}
Aggregations