Examples of FakeSequentialFileFactory


Examples of org.hornetq.tests.unit.core.journal.impl.fakes.FakeSequentialFileFactory

      testDamagedPage(new NIOSequentialFileFactory(getTestDir()), 1000);
   }

   public void testPageFakeWithoutCallbacks() throws Exception
   {
      testAdd(new FakeSequentialFileFactory(1, false), 10);
   }
View Full Code Here

Examples of org.hornetq.tests.unit.core.journal.impl.fakes.FakeSequentialFileFactory

   }

   /** Validate if everything we add is recovered */
   public void testDamagedPage() throws Exception
   {
      testDamagedPage(new FakeSequentialFileFactory(1, false), 100);
   }
View Full Code Here

Examples of org.hornetq.tests.unit.core.journal.impl.fakes.FakeSequentialFileFactory

   // This test just validates basic alignment on the FakeSequentialFile itself
   public void testBasicAlignment() throws Exception
   {

      FakeSequentialFileFactory factory = new FakeSequentialFileFactory(200, true);

      SequentialFile file = factory.createSequentialFile("test1", 1);

      file.open();

      try
      {
View Full Code Here

Examples of org.hornetq.tests.unit.core.journal.impl.fakes.FakeSequentialFileFactory

      }
   }

   public void testInconsistentAlignment() throws Exception
   {
      factory = new FakeSequentialFileFactory(512, true);

      try
      {
         journalImpl = new JournalImpl(2000, 2, 0, 0, factory, "tt", "tt", 1000);
         Assert.fail("Supposed to throw an exception");
View Full Code Here

Examples of org.hornetq.tests.unit.core.journal.impl.fakes.FakeSequentialFileFactory

   }

   public void testAlignmentOverReload() throws Exception
   {

      SequentialFileFactory factory = new FakeSequentialFileFactory(512, false);
      JournalImpl impl = new JournalImpl(512 + 512 * 3, 20, 0, 0, factory, "hq", "hq", 1000);

      impl.start();

      impl.load(AlignedJournalImplTest.dummyLoader);
View Full Code Here

Examples of org.hornetq.tests.unit.core.journal.impl.fakes.FakeSequentialFileFactory

   private void setupAndLoadJournal(final int journalSize, final int alignment, final int numberOfMinimalFiles) throws Exception
   {
      if (factory == null)
      {
         factory = new FakeSequentialFileFactory(alignment, true);
      }

      if (journalImpl != null)
      {
         journalImpl.stop();
View Full Code Here

Examples of org.hornetq.tests.unit.core.journal.impl.fakes.FakeSequentialFileFactory

public class FakeJournalImplTest extends JournalImplTestUnit
{
   @Override
   protected SequentialFileFactory getFileFactory() throws Exception
   {
      return new FakeSequentialFileFactory();
   }
View Full Code Here

Examples of org.hornetq.tests.unit.core.journal.impl.fakes.FakeSequentialFileFactory

      testDamagedPage(new NIOSequentialFileFactory(getTestDir()), 1000);
   }

   public void testPageFakeWithoutCallbacks() throws Exception
   {
      testAdd(new FakeSequentialFileFactory(1, false), 10);
   }
View Full Code Here

Examples of org.hornetq.tests.unit.core.journal.impl.fakes.FakeSequentialFileFactory

   }

   /** Validate if everything we add is recovered */
   public void testDamagedPage() throws Exception
   {
      testDamagedPage(new FakeSequentialFileFactory(1, false), 100);
   }
View Full Code Here

Examples of org.hornetq.tests.unit.core.journal.impl.fakes.FakeSequentialFileFactory

      final SequentialFileFactory factory;

      public FakeStoreFactory()
      {
         factory = new FakeSequentialFileFactory();
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.