use of io.questdb.cairo.CairoException in project questdb by bluestreak01.
the class TypeManagerTest method testIllegalParameterForGetTypeAdapter.
private void testIllegalParameterForGetTypeAdapter(int columnType) {
TextConfiguration textConfiguration = new DefaultTextConfiguration();
TypeManager typeManager = new TypeManager(textConfiguration, utf8Sink);
try {
typeManager.getTypeAdapter(columnType);
Assert.fail();
} catch (CairoException e) {
TestUtils.assertContains(e.getFlyweightMessage(), "no adapter for type");
}
}
use of io.questdb.cairo.CairoException in project questdb by bluestreak01.
the class DropTableTest method testDropBusyReader.
@Test
public void testDropBusyReader() throws Exception {
assertMemoryLeak(() -> {
CompiledQuery cc = compiler.compile("create table 'large table' (a int)", sqlExecutionContext);
Assert.assertEquals(CompiledQuery.CREATE_TABLE, cc.getType());
try (RecordCursorFactory factory = compiler.compile("'large table'", sqlExecutionContext).getRecordCursorFactory()) {
try (RecordCursor ignored = factory.getCursor(sqlExecutionContext)) {
compiler.compile("drop table 'large table'", sqlExecutionContext);
}
} catch (CairoException e) {
TestUtils.assertContains(e.getFlyweightMessage(), "Could not lock");
}
});
}
Aggregations