aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/com
diff options
context:
space:
mode:
authorJames Ahlborn <jtahlborn@yahoo.com>2015-04-26 19:13:29 +0000
committerJames Ahlborn <jtahlborn@yahoo.com>2015-04-26 19:13:29 +0000
commit4920d75eeecf1f064403c567deb8f2d8c0ac2839 (patch)
tree50af57dbf7d69e05d6643bed0a9eef2ee8e9c210 /src/test/java/com
parent05214565537ff0ca6af897168c785bb2210e58ba (diff)
downloadjackcess-4920d75eeecf1f064403c567deb8f2d8c0ac2839.tar.gz
jackcess-4920d75eeecf1f064403c567deb8f2d8c0ac2839.zip
use inmem dbs to speed up slow unit tests
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@937 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'src/test/java/com')
-rw-r--r--src/test/java/com/healthmarketscience/jackcess/CursorTest.java8
-rw-r--r--src/test/java/com/healthmarketscience/jackcess/DatabaseTest.java6
2 files changed, 7 insertions, 7 deletions
diff --git a/src/test/java/com/healthmarketscience/jackcess/CursorTest.java b/src/test/java/com/healthmarketscience/jackcess/CursorTest.java
index a75c59a..7834d18 100644
--- a/src/test/java/com/healthmarketscience/jackcess/CursorTest.java
+++ b/src/test/java/com/healthmarketscience/jackcess/CursorTest.java
@@ -85,7 +85,7 @@ public class CursorTest extends TestCase {
private static Database createTestTable(final FileFormat fileFormat)
throws Exception
{
- Database db = create(fileFormat);
+ Database db = createMem(fileFormat);
Table table = new TableBuilder("test")
.addColumn(new ColumnBuilder("id", DataType.LONG))
@@ -143,7 +143,7 @@ public class CursorTest extends TestCase {
private static Database createDupeTestTable(final FileFormat fileFormat)
throws Exception
{
- Database db = create(fileFormat);
+ Database db = createMem(fileFormat);
Table table = new TableBuilder("test")
.addColumn(new ColumnBuilder("id", DataType.LONG))
@@ -1069,7 +1069,7 @@ public class CursorTest extends TestCase {
{
for (final TestDB testDB : TestDB.getSupportedForBasename(Basename.INDEX)) {
- Database db = open(testDB);
+ Database db = openMem(testDB);
Table t1 = db.getTable("Table1");
Index idx = t1.getIndex(IndexBuilder.PRIMARY_KEY_NAME);
IndexCursor cursor = CursorBuilder.createCursor(idx);
@@ -1278,7 +1278,7 @@ public class CursorTest extends TestCase {
public void testIterationEarlyExit() throws Exception {
for (final FileFormat fileFormat : JetFormatTest.SUPPORTED_FILEFORMATS) {
- Database db = create(fileFormat);
+ Database db = createMem(fileFormat);
Table table = new TableBuilder("test")
.addColumn(new ColumnBuilder("id", DataType.LONG))
diff --git a/src/test/java/com/healthmarketscience/jackcess/DatabaseTest.java b/src/test/java/com/healthmarketscience/jackcess/DatabaseTest.java
index 0752fec..b78d7ff 100644
--- a/src/test/java/com/healthmarketscience/jackcess/DatabaseTest.java
+++ b/src/test/java/com/healthmarketscience/jackcess/DatabaseTest.java
@@ -390,7 +390,7 @@ public class DatabaseTest extends TestCase
public void testWriteAndReadInBatch() throws Exception {
for (final FileFormat fileFormat : SUPPORTED_FILEFORMATS) {
- Database db = create(fileFormat);
+ Database db = createMem(fileFormat);
createTestTable(db);
int count = 1000;
List<Object[]> rows = new ArrayList<Object[]>(count);
@@ -1203,7 +1203,7 @@ public class DatabaseTest extends TestCase
public void testUpdateRow() throws Exception
{
for (final FileFormat fileFormat : SUPPORTED_FILEFORMATS) {
- Database db = create(fileFormat);
+ Database db = createMem(fileFormat);
Table t = new TableBuilder("test")
.addColumn(new ColumnBuilder("name", DataType.TEXT))
@@ -1528,7 +1528,7 @@ public class DatabaseTest extends TestCase
public void testUnicodeCompression() throws Exception
{
File dbFile = new File("src/test/data/V2003/testUnicodeCompV2003.mdb");
- Database db = open(Database.FileFormat.V2003, new File("src/test/data/V2003/testUnicodeCompV2003.mdb"));
+ Database db = open(Database.FileFormat.V2003, new File("src/test/data/V2003/testUnicodeCompV2003.mdb"), true);
StringBuilder sb = new StringBuilder(127);
for(int i = 1; i <= 0xFF; ++i) {