Package org.hornetq.core.paging.impl

Examples of org.hornetq.core.paging.impl.TestSupportPageStore


                                                            new NullStorageManager(),
                                                            addressSettings);

      managerImpl.start();

      TestSupportPageStore store = (TestSupportPageStore)managerImpl.getPageStore(new SimpleString("simple-test"));

      ServerMessage msg = createMessage(1l, new SimpleString("simple-test"), createRandomBuffer(10));

      Assert.assertFalse(store.page(msg, true));

      store.startPaging();

      Assert.assertTrue(store.page(msg, true));

      Page page = store.depage();

      page.open();

      List<PagedMessage> msgs = page.read();

      page.close();

      Assert.assertEquals(1, msgs.size());

      UnitTestCase.assertEqualsByteArrays(msg.getBodyBuffer().toByteBuffer().array(), msgs.get(0)
                                                                                          .getMessage(null)
                                                                                          .getBodyBuffer()
                                                                                          .toByteBuffer()
                                                                                          .array());

      Assert.assertTrue(store.isPaging());

      Assert.assertNull(store.depage());

      Assert.assertFalse(store.page(msg, true));
   }
View Full Code Here

TOP

Related Classes of org.hornetq.core.paging.impl.TestSupportPageStore

Copyright © 2018 www.massapicom. 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.