use of net.openhft.chronicle.wire.WireType in project Chronicle-Queue by OpenHFT.
the class Queue28Test method test.
/*
* Tailer doesn't work if created before the appender
*
* See https://higherfrequencytrading.atlassian.net/browse/QUEUE-28
*/
@Test
public void test() {
File dir = getTmpDir();
try (final ChronicleQueue queue = SingleChronicleQueueBuilder.builder(dir, wireType).testBlockSize().build()) {
final ExcerptTailer tailer = queue.createTailer();
assertFalse(tailer.readDocument(r -> r.read(TestKey.test).int32()));
final ExcerptAppender appender = queue.acquireAppender();
appender.writeDocument(w -> w.write(TestKey.test).int32(1));
Jvm.pause(100);
assertTrue(tailer.readDocument(r -> r.read(TestKey.test).int32()));
}
}
Aggregations