use of org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.SimpleEncoding in project activemq-artemis by apache.
the class NIOImportExportTest method testExportImport3.
@Test
public void testExportImport3() throws Exception {
setup(10, 10 * 4096, true);
createJournal();
startJournal();
load();
add(1, 2);
journal.forceMoveNextFile();
delete(1, 2);
add(3, 4);
journal.forceMoveNextFile();
addTx(5, 6, 7, 8);
journal.forceMoveNextFile();
addTx(5, 9);
commit(5);
journal.forceMoveNextFile();
deleteTx(10, 6, 7, 8, 9);
commit(10);
addTx(11, 12, 13);
EncodingSupport xid = new SimpleEncoding(10, (byte) 0);
prepare(11, xid);
stopJournal();
exportImportJournal();
createJournal();
startJournal();
loadAndCheck();
commit(11);
stopJournal();
exportImportJournal();
createJournal();
startJournal();
loadAndCheck();
}
use of org.apache.activemq.artemis.tests.unit.core.journal.impl.fakes.SimpleEncoding in project activemq-artemis by apache.
the class NIOJournalCompactTest method testCompactPrepareRestart2.
@Test
public void testCompactPrepareRestart2() throws Exception {
setup(2, 60 * 1024, false);
createJournal();
startJournal();
load();
addTx(1, 2);
prepare(1, new SimpleEncoding(10, (byte) 0));
stopJournal();
createJournal();
startJournal();
loadAndCheck();
startCompact();
commit(1);
finishCompact();
journal.testCompact();
stopJournal();
createJournal();
startJournal();
loadAndCheck();
}
Aggregations