/*
 *
 *    Copyright (C) 2015  higherfrequencytrading.com
 *
 *    This program is free software: you can redistribute it and/or modify
 *    it under the terms of the GNU Lesser General Public License as published by
 *    the Free Software Foundation, either version 3 of the License.
 *
 *    This program is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU Lesser General Public License for more details.
 *
 *    You should have received a copy of the GNU Lesser General Public License
 *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
package net.openhft.chronicle.queue.impl.single;

import net.openhft.chronicle.queue.ChronicleQueue;
import net.openhft.chronicle.queue.ChronicleQueueTestBase;
import net.openhft.chronicle.queue.ExcerptAppender;
import net.openhft.chronicle.wire.WireType;
import org.junit.Ignore;
import org.junit.Test;

import java.io.IOException;

public class Queue30 extends ChronicleQueueTestBase  {

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

        Runnable r = () -> {
            try {
                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) {
                        //System.out.println(Thread.currentThread().getName() + "> " + count);
                    }
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        };

        Thread t1 = new Thread(r);
        Thread t2 = new Thread(r);

        t1.start();
        t2.start();

        t1.join();
        t2.join();
    }
}

@@ -1052,75 +1052,12 @@
 n;%0A%0A
-public class Queue30 extends ChronicleQueueTestBase  %7B%0A%0A    /*%0A    
+/**%0A
  * S
@@ -1125,14 +1125,66 @@
 30%0A 
-    */
+*/%0Apublic class Queue30 extends ChronicleQueueTestBase  %7B%0A
 %0A   
@@ -1222,16 +1222,18 @@
 oid test
+MT
 () throw
@@ -1962,61 +1962,24 @@
     
-//System.out.println(Thread.currentThread().getN
+LOGGER.info(n
 ame
-()
  + %22
@@ -2288,11 +2288,727 @@
 );%0A    %7D
+%0A%0A    @Ignore%0A    @Test%0A    public void testST() throws Exception %7B%0A        final ChronicleQueue queue = new SingleChronicleQueueBuilder(getTmpDir())%0A            .wireType(WireType.TEXT)%0A            .blockSize(640_000)%0A            .build();%0A%0A        final String name = Thread.currentThread().getName();%0A        final ExcerptAppender appender = queue.createAppender();%0A        for (int count = 0; ; count++) %7B%0A            final int c = count;%0A            appender.writeDocument(w -%3E%0A                w.write(() -%3E %22thread%22).text(name)%0A                 .write(() -%3E %22count%22).int32(c)%0A            );%0A%0A            if (count %25 10_000 == 0) %7B%0A                LOGGER.info(name + %22%3E %22 + count);%0A            %7D%0A        %7D%0A    %7D
 %0A%7D%0A

Add multi an single thread tests (ignored)