Search in sources :

Example 6 with FilesFacadeImpl

use of com.questdb.std.FilesFacadeImpl in project questdb by bluestreak01.

the class TableReadFailTest method testMetaFileMissingConstructor.

@Test
public void testMetaFileMissingConstructor() throws Exception {
    FilesFacade ff = new FilesFacadeImpl() {

        @Override
        public boolean exists(LPSZ path) {
            return !Chars.endsWith(path, TableUtils.META_FILE_NAME) && super.exists(path);
        }
    };
    assertConstructorFail(ff);
}
Also used : FilesFacade(com.questdb.std.FilesFacade) LPSZ(com.questdb.std.str.LPSZ) FilesFacadeImpl(com.questdb.std.FilesFacadeImpl) Test(org.junit.Test)

Example 7 with FilesFacadeImpl

use of com.questdb.std.FilesFacadeImpl in project questdb by bluestreak01.

the class TableReadFailTest method testMetaFileCannotOpenConstructor.

@Test
public void testMetaFileCannotOpenConstructor() throws Exception {
    FilesFacade ff = new FilesFacadeImpl() {

        @Override
        public long openRO(LPSZ name) {
            if (Chars.endsWith(name, TableUtils.META_FILE_NAME)) {
                return -1;
            }
            return super.openRO(name);
        }
    };
    assertConstructorFail(ff);
}
Also used : FilesFacade(com.questdb.std.FilesFacade) LPSZ(com.questdb.std.str.LPSZ) FilesFacadeImpl(com.questdb.std.FilesFacadeImpl) Test(org.junit.Test)

Aggregations

FilesFacadeImpl (com.questdb.std.FilesFacadeImpl)7 LPSZ (com.questdb.std.str.LPSZ)7 Test (org.junit.Test)7 FilesFacade (com.questdb.std.FilesFacade)6 CairoEngine (com.questdb.cairo.sql.CairoEngine)1 Path (com.questdb.std.str.Path)1 JournalMetadata (com.questdb.store.factory.configuration.JournalMetadata)1