Author: clebert.suconic(a)jboss.com
Date: 2009-11-25 19:13:49 -0500 (Wed, 25 Nov 2009)
New Revision: 8406
Modified:
branches/20-optimisation/tests/src/org/hornetq/tests/unit/core/journal/impl/JournalImplTestBase.java
branches/20-optimisation/tests/src/org/hornetq/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java
Log:
Fixing a few Journal Fake tests
Modified:
branches/20-optimisation/tests/src/org/hornetq/tests/unit/core/journal/impl/JournalImplTestBase.java
===================================================================
---
branches/20-optimisation/tests/src/org/hornetq/tests/unit/core/journal/impl/JournalImplTestBase.java 2009-11-26
00:06:37 UTC (rev 8405)
+++
branches/20-optimisation/tests/src/org/hornetq/tests/unit/core/journal/impl/JournalImplTestBase.java 2009-11-26
00:13:49 UTC (rev 8406)
@@ -91,7 +91,10 @@
}
}
- fileFactory.stop();
+ if (fileFactory != null)
+ {
+ fileFactory.stop();
+ }
fileFactory = null;
Modified:
branches/20-optimisation/tests/src/org/hornetq/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java
===================================================================
---
branches/20-optimisation/tests/src/org/hornetq/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java 2009-11-26
00:06:37 UTC (rev 8405)
+++
branches/20-optimisation/tests/src/org/hornetq/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java 2009-11-26
00:13:49 UTC (rev 8406)
@@ -618,6 +618,8 @@
*/
public void write(HornetQBuffer bytes, boolean sync) throws Exception
{
+ bytes.writerIndex(bytes.capacity());
+ bytes.readerIndex(0);
writeDirect(bytes.toByteBuffer(), sync);
}
Show replies by date