Skip to content

Commit

Permalink
Add multi an single thread tests (ignored)
Browse files Browse the repository at this point in the history
  • Loading branch information
lburgazzoli committed Oct 23, 2015
1 parent 92b9b27 commit 61f189e
Showing 1 changed file with 28 additions and 5 deletions.
Expand Up @@ -26,14 +26,14 @@


import java.io.IOException; import java.io.IOException;


/**
* See https://higherfrequencytrading.atlassian.net/browse/QUEUE-30
*/
public class Queue30 extends ChronicleQueueTestBase { public class Queue30 extends ChronicleQueueTestBase {


/*
* See https://higherfrequencytrading.atlassian.net/browse/QUEUE-30
*/
@Ignore @Ignore
@Test @Test
public void test() throws Exception { public void testMT() throws Exception {
final ChronicleQueue queue = new SingleChronicleQueueBuilder(getTmpDir()) final ChronicleQueue queue = new SingleChronicleQueueBuilder(getTmpDir())
.wireType(WireType.TEXT) .wireType(WireType.TEXT)
.blockSize(640_000) .blockSize(640_000)
Expand All @@ -51,7 +51,7 @@ public void test() throws Exception {
); );


if (count % 10_000 == 0) { if (count % 10_000 == 0) {
//System.out.println(Thread.currentThread().getName() + "> " + count); LOGGER.info(name + "> " + count);
} }
} }
} catch (IOException e) { } catch (IOException e) {
Expand All @@ -68,4 +68,27 @@ public void test() throws Exception {
t1.join(); t1.join();
t2.join(); t2.join();
} }

@Ignore
@Test
public void testST() throws Exception {
final ChronicleQueue queue = new SingleChronicleQueueBuilder(getTmpDir())
.wireType(WireType.TEXT)
.blockSize(640_000)
.build();

final String name = Thread.currentThread().getName();
final ExcerptAppender appender = queue.createAppender();
for (int count = 0; ; count++) {
final int c = count;
appender.writeDocument(w ->
w.write(() -> "thread").text(name)
.write(() -> "count").int32(c)
);

if (count % 10_000 == 0) {
LOGGER.info(name + "> " + count);
}
}
}
} }

0 comments on commit 61f189e

Please sign in to comment.