Author: clebert.suconic(a)jboss.com
Date: 2009-11-12 00:23:09 -0500 (Thu, 12 Nov 2009)
New Revision: 8269
Added:
trunk/tests/src/org/hornetq/tests/integration/journal/NIONonBufferedSequentialFileFactoryTest.java
Modified:
trunk/tests/src/org/hornetq/tests/integration/journal/NIOJournalImplTest.java
trunk/tests/src/org/hornetq/tests/integration/journal/NIOSequentialFileFactoryTest.java
trunk/tests/src/org/hornetq/tests/integration/journal/ValidateTransactionHealthTest.java
Log:
tweaks
Modified: trunk/tests/src/org/hornetq/tests/integration/journal/NIOJournalImplTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/journal/NIOJournalImplTest.java 2009-11-12
05:16:18 UTC (rev 8268)
+++
trunk/tests/src/org/hornetq/tests/integration/journal/NIOJournalImplTest.java 2009-11-12
05:23:09 UTC (rev 8269)
@@ -42,7 +42,7 @@
file.mkdir();
- return new NIOSequentialFileFactory(getTestDir());
+ return new NIOSequentialFileFactory(getTestDir(), true);
}
@Override
Added:
trunk/tests/src/org/hornetq/tests/integration/journal/NIONonBufferedSequentialFileFactoryTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/journal/NIONonBufferedSequentialFileFactoryTest.java
(rev 0)
+++
trunk/tests/src/org/hornetq/tests/integration/journal/NIONonBufferedSequentialFileFactoryTest.java 2009-11-12
05:23:09 UTC (rev 8269)
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2009 Red Hat, Inc.
+ * Red Hat licenses this file to you under the Apache License, version
+ * 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.hornetq.tests.integration.journal;
+
+import java.io.File;
+
+import org.hornetq.core.journal.SequentialFileFactory;
+import org.hornetq.core.journal.impl.NIOSequentialFileFactory;
+import org.hornetq.tests.unit.core.journal.impl.SequentialFileFactoryTestBase;
+
+/**
+ *
+ * A NIOSequentialFileFactoryTest
+ *
+ * @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
+ *
+ */
+public class NIONonBufferedSequentialFileFactoryTest extends
SequentialFileFactoryTestBase
+{
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ File file = new File(getTestDir());
+
+ deleteDirectory(file);
+
+ file.mkdir();
+ }
+
+ @Override
+ protected SequentialFileFactory createFactory()
+ {
+ return new NIOSequentialFileFactory(getTestDir(), false);
+ }
+
+}
Modified:
trunk/tests/src/org/hornetq/tests/integration/journal/NIOSequentialFileFactoryTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/journal/NIOSequentialFileFactoryTest.java 2009-11-12
05:16:18 UTC (rev 8268)
+++
trunk/tests/src/org/hornetq/tests/integration/journal/NIOSequentialFileFactoryTest.java 2009-11-12
05:23:09 UTC (rev 8269)
@@ -44,7 +44,7 @@
@Override
protected SequentialFileFactory createFactory()
{
- return new NIOSequentialFileFactory(getTestDir());
+ return new NIOSequentialFileFactory(getTestDir(), true);
}
}
Modified:
trunk/tests/src/org/hornetq/tests/integration/journal/ValidateTransactionHealthTest.java
===================================================================
---
trunk/tests/src/org/hornetq/tests/integration/journal/ValidateTransactionHealthTest.java 2009-11-12
05:16:18 UTC (rev 8268)
+++
trunk/tests/src/org/hornetq/tests/integration/journal/ValidateTransactionHealthTest.java 2009-11-12
05:23:09 UTC (rev 8269)
@@ -396,11 +396,11 @@
else
if (factoryType.equals("nio2"))
{
- return new NIOSequentialFileFactory(directory, false);
+ return new NIOSequentialFileFactory(directory, true);
}
else
{
- return new NIOSequentialFileFactory(directory);
+ return new NIOSequentialFileFactory(directory, false);
}
}