From: James Ahlborn Date: Sun, 13 Apr 2008 22:17:42 +0000 (+0000) Subject: allow autoflush to be modified for tests X-Git-Tag: rel_1_1_14~25 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fdcf376a62f35396ccb8e8ba5eeeb2670e45e75b;p=jackcess.git 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 --- 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 {