@@ -0,0 +1,3228 @@
+/*%0A * Copyright 2014 Higher Frequency Trading%0A *%0A * http://www.higherfrequencytrading.com%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage net.openhft.chronicle;%0A%0Aimport net.openhft.lang.io.IOTools;%0Aimport org.junit.Test;%0A%0Aimport java.io.IOException;%0Aimport java.util.concurrent.ExecutorService;%0Aimport java.util.concurrent.Executors;%0Aimport java.util.concurrent.TimeUnit;%0A%0Apublic class VanillaFilePerMinuteTest extends VanillaChronicleTestBase %7B%0A%0A    static final String FMT = %22yyyyMMddHHmm%22;%0A    static final int    MIN = 60 * 1000;%0A%0A    @Test%0A    public void filePerMinuteTest() throws Exception %7B%0A        final String basePath = getTestPath();%0A        IOTools.deleteDir(basePath);%0A%0A        LOGGER.info(%22Basepath is %7B%7D%22, basePath);%0A%0A        final ExecutorService svc = Executors.newFixedThreadPool(2);%0A        svc.execute(createWriter(createChronicle(basePath)));%0A        svc.execute(createReader(createChronicle(basePath)));%0A        svc.awaitTermination(10, TimeUnit.MINUTES);%0A    %7D%0A%0A    // *************************************************************************%0A    //%0A    // *************************************************************************%0A%0A    static Runnable createReader(final Chronicle chron) %7B%0A        return new Runnable() %7B%0A            @Override%0A            public void run() %7B%0A                try(ExcerptTailer tailer = chron.createTailer()) %7B%0A                    for(int i=0; i%3C1000;) %7B%0A                        if(tailer.nextIndex()) %7B%0A                            LOGGER.info(%22%3E R : %7B%7D%22, tailer.readInt());%0A                            i++;%0A                        %7D else %7B%0A                            Thread.sleep(1000);%0A                        %7D%0A                    %7D%0A                %7D catch (Exception e) %7B%0A                    LOGGER.warn(%22%22, e);%0A                %7D%0A            %7D%0A        %7D;%0A    %7D%0A%0A    static Runnable createWriter(final Chronicle chron) %7B%0A        return new Runnable() %7B%0A            @Override%0A            public void run() %7B%0A                try(ExcerptAppender appender = chron.createAppender()) %7B%0A                    for (int i = 0; i %3C 1000; i++) %7B%0A                        LOGGER.info(%22%3E W : %7B%7D%22, i);%0A%0A                        appender.startExcerpt(4);%0A                        appender.writeInt(i);%0A                        appender.finish();%0A%0A                        Thread.sleep(1000);%0A                    %7D%0A                %7D catch (Exception e) %7B%0A                    LOGGER.warn(%22%22, e);%0A                %7D%0A            %7D%0A        %7D;%0A    %7D%0A%0A    static Chronicle createChronicle(String basePath) throws IOException %7B%0A        return ChronicleQueueBuilder.vanilla(basePath)%0A            .cycleLength(MIN, false)%0A            .cycleFormat(FMT)%0A            .build();%0A    %7D%0A%7D%0A

add test case