From do-not-reply at jboss.org Mon Sep 19 11:31:39 2011 Content-Type: multipart/mixed; boundary="===============7426498595824903453==" MIME-Version: 1.0 From: do-not-reply at jboss.org To: hornetq-commits at lists.jboss.org Subject: [hornetq-commits] JBoss hornetq SVN: r11365 - in branches/HORNETQ-720_Replication/tests: integration-tests/src/test/java/org/hornetq/tests/integration/persistence and 2 other directories. Date: Mon, 19 Sep 2011 11:31:39 -0400 Message-ID: <201109191531.p8JFVd9i003843@svn01.web.mwc.hst.phx2.redhat.com> --===============7426498595824903453== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: borges Date: 2011-09-19 11:31:38 -0400 (Mon, 19 Sep 2011) New Revision: 11365 Modified: branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/o= rg/hornetq/tests/integration/journal/NIOJournalCompactTest.java branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/o= rg/hornetq/tests/integration/persistence/DeleteMessagesOnStartupTest.java branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/o= rg/hornetq/tests/integration/persistence/RestartSMTest.java branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/o= rg/hornetq/tests/integration/persistence/StorageManagerTestBase.java branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/o= rg/hornetq/tests/integration/replication/ReplicationTest.java branches/HORNETQ-720_Replication/tests/unit-tests/src/test/java/org/horn= etq/tests/unit/core/postoffice/impl/DuplicateDetectionUnitTest.java Log: delete constructor used only in tests Modified: branches/HORNETQ-720_Replication/tests/integration-tests/src/test= /java/org/hornetq/tests/integration/journal/NIOJournalCompactTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/= org/hornetq/tests/integration/journal/NIOJournalCompactTest.java 2011-09-19= 15:30:13 UTC (rev 11364) +++ branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/= org/hornetq/tests/integration/journal/NIOJournalCompactTest.java 2011-09-19= 15:31:38 UTC (rev 11365) @@ -54,9 +54,9 @@ import org.hornetq.utils.SimpleIDGenerator; = /** - * = + * * A JournalImplTestBase - * = + * * @author Clebert Suconic<= /a> * */ @@ -131,11 +131,11 @@ Assert.assertFalse(iterNewFiles.hasNext()); = } - = + // public void testRepeat() throws Exception // { // int i =3D 0 ; -// = +// // while (true) // { // System.out.println("#test (" + (i++) + ")"); @@ -1746,16 +1746,16 @@ final AtomicLong seqGenerator =3D new AtomicLong(1); = final ExecutorService executor =3D Executors.newCachedThreadPool(); - = + OrderedExecutorFactory factory =3D new OrderedExecutorFactory(execut= or); - = + final ExecutorService deleteExecutor =3D Executors.newCachedThreadPo= ol(); = - final JournalStorageManager storage =3D new JournalStorageManager(co= nfig, factory); + final JournalStorageManager storage =3D new JournalStorageManager(co= nfig, factory, null); = storage.start(); storage.loadInternalOnly(); - = + ((JournalImpl)storage.getMessageJournal()).setAutoReclaim(false); final LinkedList survivingMsgs =3D new LinkedList(); = @@ -1785,9 +1785,9 @@ storage.storeMessageTransactional(tx, message); } ServerMessageImpl message =3D new ServerMessageImpl(seqG= enerator.incrementAndGet(), 100); - = + survivingMsgs.add(message.getMessageID()); - = + // This one will stay here forever storage.storeMessage(message); = @@ -1874,9 +1874,9 @@ executor.shutdown(); = assertTrue(executor.awaitTermination(10, TimeUnit.SECONDS)); - = + deleteExecutor.shutdown(); - = + assertTrue(deleteExecutor.awaitTermination(30, TimeUnit.SECONDS)); = storage.stop(); @@ -1894,6 +1894,7 @@ file.mkdir(); } = + @Override protected void tearDown() throws Exception { = Modified: branches/HORNETQ-720_Replication/tests/integration-tests/src/test= /java/org/hornetq/tests/integration/persistence/DeleteMessagesOnStartupTest= .java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/= org/hornetq/tests/integration/persistence/DeleteMessagesOnStartupTest.java = 2011-09-19 15:30:13 UTC (rev 11364) +++ branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/= org/hornetq/tests/integration/persistence/DeleteMessagesOnStartupTest.java = 2011-09-19 15:31:38 UTC (rev 11365) @@ -54,20 +54,20 @@ public void testDeleteMessagesOnStartup() throws Exception { createStorage(); - = + Queue theQueue =3D new FakeQueue(new SimpleString("")); HashMap queues =3D new HashMap(); queues.put(100l, theQueue); - = + ServerMessage msg =3D new ServerMessageImpl(1, 100); - = + journal.storeMessage(msg); = for (int i =3D 2; i < 100; i++) { journal.storeMessage(new ServerMessageImpl(i, 100)); } - = + journal.storeReference(100, 1, true); = journal.stop(); @@ -75,21 +75,23 @@ journal.start(); = journal.loadBindingJournal(new ArrayList(), new Ar= rayList()); - = + journal.loadMessageJournal(new FakePostOffice(), null, null, queues,= null, null); = assertEquals(98, deletedMessage.size()); - = + for (Long messageID : deletedMessage) { assertTrue("messageID =3D " + messageID, messageID.longValue() >= =3D 2 && messageID <=3D 99); } } = + @Override protected JournalStorageManager createJournalStorageManager(Configurati= on configuration) { - return new JournalStorageManager(configuration, execFactory) + return new JournalStorageManager(configuration, execFactory, null) { + @Override public void deleteMessage(final long messageID) throws Exception { System.out.println("message : " + messageID); @@ -107,6 +109,6 @@ // Private ------------------------------------------------------- = // Inner classes ------------------------------------------------- - = = + } Modified: branches/HORNETQ-720_Replication/tests/integration-tests/src/test= /java/org/hornetq/tests/integration/persistence/RestartSMTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/= org/hornetq/tests/integration/persistence/RestartSMTest.java 2011-09-19 15:= 30:13 UTC (rev 11364) +++ branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/= org/hornetq/tests/integration/persistence/RestartSMTest.java 2011-09-19 15:= 31:38 UTC (rev 11365) @@ -27,7 +27,6 @@ import org.hornetq.core.persistence.QueueBindingInfo; import org.hornetq.core.persistence.impl.journal.JournalStorageManager; import org.hornetq.core.postoffice.PostOffice; -import org.hornetq.core.server.JournalType; import org.hornetq.core.server.Queue; import org.hornetq.tests.unit.core.server.impl.fakes.FakePostOffice; import org.hornetq.tests.util.ServiceTestBase; @@ -38,7 +37,7 @@ * A DeleteMessagesRestartTest * * @author Clebert Suconic<= /a> - * = + * * Created Mar 2, 2009 10:14:38 AM * * @@ -88,7 +87,7 @@ = PostOffice postOffice =3D new FakePostOffice(); = - final JournalStorageManager journal =3D new JournalStorageManager(co= nfiguration, execFactory); + final JournalStorageManager journal =3D new JournalStorageManager(co= nfiguration, execFactory, null); = try { Modified: branches/HORNETQ-720_Replication/tests/integration-tests/src/test= /java/org/hornetq/tests/integration/persistence/StorageManagerTestBase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/= org/hornetq/tests/integration/persistence/StorageManagerTestBase.java 2011-= 09-19 15:30:13 UTC (rev 11364) +++ branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/= org/hornetq/tests/integration/persistence/StorageManagerTestBase.java 2011-= 09-19 15:31:38 UTC (rev 11365) @@ -49,9 +49,9 @@ protected ExecutorService executor; = protected ExecutorFactory execFactory; - = + protected JournalStorageManager journal; - = + protected JMSStorageManager jmsJournal; = = @@ -72,7 +72,7 @@ execFactory =3D new OrderedExecutorFactory(executor); = File testdir =3D new File(getTestDir()); - = + deleteDirectory(testdir); } = @@ -80,7 +80,7 @@ protected void tearDown() throws Exception { executor.shutdown(); - = + if (journal !=3D null) { try @@ -91,7 +91,7 @@ { e.printStackTrace(); // >> junit report } - = + journal =3D null; } = @@ -105,13 +105,13 @@ { e.printStackTrace(); // >> junit report } - = + jmsJournal =3D null; } = super.tearDown(); } - = + /** * @return * @throws Exception @@ -125,7 +125,7 @@ journal.start(); = journal.loadBindingJournal(new ArrayList(), new Ar= rayList()); - = + Map queues =3D new HashMap(); = journal.loadMessageJournal(new FakePostOffice(), null, null, queues,= null, null); @@ -136,7 +136,7 @@ */ protected JournalStorageManager createJournalStorageManager(Configurati= on configuration) { - return new JournalStorageManager(configuration, execFactory); + return new JournalStorageManager(configuration, execFactory, null); } = /** @@ -150,7 +150,7 @@ jmsJournal =3D new JMSJournalStorageManagerImpl(new TimeAndCounterID= Generator(), configuration, null); = jmsJournal.start(); - = + jmsJournal.load(); } = Modified: branches/HORNETQ-720_Replication/tests/integration-tests/src/test= /java/org/hornetq/tests/integration/replication/ReplicationTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/= org/hornetq/tests/integration/replication/ReplicationTest.java 2011-09-19 1= 5:30:13 UTC (rev 11364) +++ branches/HORNETQ-720_Replication/tests/integration-tests/src/test/java/= org/hornetq/tests/integration/replication/ReplicationTest.java 2011-09-19 1= 5:31:38 UTC (rev 11365) @@ -397,7 +397,7 @@ */ private JournalStorageManager getStorage() { - return new JournalStorageManager(createDefaultConfig(), factory); + return new JournalStorageManager(createDefaultConfig(), factory, nul= l); } = /** Modified: branches/HORNETQ-720_Replication/tests/unit-tests/src/test/java/o= rg/hornetq/tests/unit/core/postoffice/impl/DuplicateDetectionUnitTest.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/HORNETQ-720_Replication/tests/unit-tests/src/test/java/org/hor= netq/tests/unit/core/postoffice/impl/DuplicateDetectionUnitTest.java 2011-0= 9-19 15:30:13 UTC (rev 11364) +++ branches/HORNETQ-720_Replication/tests/unit-tests/src/test/java/org/hor= netq/tests/unit/core/postoffice/impl/DuplicateDetectionUnitTest.java 2011-0= 9-19 15:31:38 UTC (rev 11365) @@ -95,7 +95,7 @@ = ScheduledExecutorService scheduledThreadPool =3D Executors.newSch= eduledThreadPool(ConfigurationImpl.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE); = - journal =3D new JournalStorageManager(configuration, factory); + journal =3D new JournalStorageManager(configuration, factory, nul= l); = journal.start(); journal.loadBindingJournal(new ArrayList(), new= ArrayList()); @@ -120,7 +120,7 @@ = journal.stop(); = - journal =3D new JournalStorageManager(configuration, factory); + journal =3D new JournalStorageManager(configuration, factory, nul= l); journal.start(); journal.loadBindingJournal(new ArrayList(), new= ArrayList()); = @@ -149,7 +149,7 @@ = mapDups.clear(); = - journal =3D new JournalStorageManager(configuration, factory); + journal =3D new JournalStorageManager(configuration, factory, nul= l); journal.start(); journal.loadBindingJournal(new ArrayList(), new= ArrayList()); = --===============7426498595824903453==--