Search in sources :

Example 11 with LPSZ

use of com.questdb.std.str.LPSZ in project questdb by bluestreak01.

the class TableReadFailTest method testTodoPresentConstructor.

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

        @Override
        public boolean exists(LPSZ path) {
            return Chars.endsWith(path, TableUtils.TODO_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 12 with LPSZ

use of com.questdb.std.str.LPSZ 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 13 with LPSZ

use of com.questdb.std.str.LPSZ 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

LPSZ (com.questdb.std.str.LPSZ)13 Test (org.junit.Test)11 FilesFacadeImpl (com.questdb.std.FilesFacadeImpl)7 FilesFacade (com.questdb.std.FilesFacade)6 Path (com.questdb.std.str.Path)6 CairoEngine (com.questdb.cairo.sql.CairoEngine)1 NumericException (com.questdb.common.NumericException)1 NativeLPSZ (com.questdb.std.str.NativeLPSZ)1 JournalMetadata (com.questdb.store.factory.configuration.JournalMetadata)1 TestMicroClock (com.questdb.test.tools.TestMicroClock)1 CountDownLatch (java.util.concurrent.CountDownLatch)1