Search in sources :

Example 1 with FilePathCache

use of org.h2.mvstore.cache.FilePathCache in project h2database by h2database.

the class TestFileSystem method test.

@Override
public void test() throws Exception {
    testFileSystem(getBaseDir() + "/fs");
    testAbsoluteRelative();
    testDirectories(getBaseDir());
    testMoveTo(getBaseDir());
    testUnsupportedFeatures(getBaseDir());
    FilePathZip2.register();
    FilePath.register(new FilePathCache());
    FilePathRec.register();
    testZipFileSystem("zip:");
    testZipFileSystem("cache:zip:");
    testZipFileSystem("zip2:");
    testZipFileSystem("cache:zip2:");
    testMemFsDir();
    testClasspath();
    FilePathDebug.register().setTrace(true);
    FilePathEncrypt.register();
    testSimpleExpandTruncateSize();
    testSplitDatabaseInZip();
    testDatabaseInMemFileSys();
    testDatabaseInJar();
    // set default part size to 1 << 10
    String f = "split:10:" + getBaseDir() + "/fs";
    FileUtils.toRealPath(f);
    testFileSystem(getBaseDir() + "/fs");
    testFileSystem("memFS:");
    testFileSystem("memLZF:");
    testFileSystem("nioMemFS:");
    testFileSystem("nioMemLZF:1:");
    // 12% compressLaterCache
    testFileSystem("nioMemLZF:12:");
    testFileSystem("rec:memFS:");
    testUserHome();
    try {
        testFileSystem("nio:" + getBaseDir() + "/fs");
        testFileSystem("cache:nio:" + getBaseDir() + "/fs");
        testFileSystem("nioMapped:" + getBaseDir() + "/fs");
        testFileSystem("encrypt:0007:" + getBaseDir() + "/fs");
        testFileSystem("cache:encrypt:0007:" + getBaseDir() + "/fs");
        if (!config.splitFileSystem) {
            testFileSystem("split:" + getBaseDir() + "/fs");
            testFileSystem("split:nioMapped:" + getBaseDir() + "/fs");
        }
    } catch (Exception e) {
        e.printStackTrace();
        throw e;
    } catch (Error e) {
        e.printStackTrace();
        throw e;
    } finally {
        FileUtils.delete(getBaseDir() + "/fs");
    }
}
Also used : FilePathCache(org.h2.mvstore.cache.FilePathCache) DbException(org.h2.message.DbException) SQLException(java.sql.SQLException) IOException(java.io.IOException) NonWritableChannelException(java.nio.channels.NonWritableChannelException)

Aggregations

IOException (java.io.IOException)1 NonWritableChannelException (java.nio.channels.NonWritableChannelException)1 SQLException (java.sql.SQLException)1 DbException (org.h2.message.DbException)1 FilePathCache (org.h2.mvstore.cache.FilePathCache)1