use of com.questdb.ex.JournalMetadataException in project questdb by bluestreak01.
the class GenericInteropTest method testGenericStructureMismatch.
@Test
public void testGenericStructureMismatch() throws Exception {
try (JournalWriter writer = makeGenericWriter()) {
JournalEntryWriter w = writer.entryWriter();
w.putSym(0, "EURUSD");
w.putDate(1, 19999);
w.putDouble(2, 1.24);
w.putDouble(3, 1.25);
w.putInt(4, 10000);
w.putInt(5, 12000);
w.putInt(6, 1);
w.putStr(7, "OK");
w.putStr(8, "system");
w.putStr(9, "EURUSD:GLOBAL");
w.putBool(10, true);
w.putNull(11);
w.putLong(12, 13141516);
w.putShort(13, (short) 25000);
w.append();
writer.commit();
writer.close();
}
try {
getFactory().writer(new JournalStructure("test") {
{
$str("sym");
$date("created");
}
});
Assert.fail("Expected exception");
} catch (JournalMetadataException ignore) {
// expected
}
}
Aggregations