From fdcf376a62f35396ccb8e8ba5eeeb2670e45e75b Mon Sep 17 00:00:00 2001 From: James Ahlborn Date: Sun, 13 Apr 2008 22:17:42 +0000 Subject: [PATCH] allow autoflush to be modified for tests git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@322 f203690c-595d-4dc9-a70b-905162fa7fd2 --- .../com/healthmarketscience/jackcess/DatabaseTest.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java b/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java index 5592e8c..abdb88b 100644 --- a/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java +++ b/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java @@ -58,6 +58,8 @@ import junit.framework.TestCase; * @author Tim McCune */ public class DatabaseTest extends TestCase { + + static boolean _autoSync = Database.DEFAULT_AUTO_SYNC; public DatabaseTest(String name) throws Exception { super(name); @@ -68,7 +70,7 @@ public class DatabaseTest extends TestCase { } static Database open(File file) throws Exception { - return Database.open(file, true, Database.DEFAULT_AUTO_SYNC); + return Database.open(file, true, _autoSync); } static Database create() throws Exception { @@ -76,7 +78,7 @@ public class DatabaseTest extends TestCase { } static Database create(boolean keep) throws Exception { - return Database.create(createTempFile(keep)); + return Database.create(createTempFile(keep), _autoSync); } static Database openCopy(File srcFile) throws Exception { @@ -86,7 +88,7 @@ public class DatabaseTest extends TestCase { static Database openCopy(File srcFile, boolean keep) throws Exception { File tmp = createTempFile(keep); copyFile(srcFile, tmp); - return Database.open(tmp); + return Database.open(tmp, false, _autoSync); } public void testInvalidTableDefs() throws Exception { -- 2.39.5