Search in sources :

Example 6 with SystemInfo

use of org.smartdata.model.SystemInfo in project SSM by Intel-bigdata.

the class TestMetaStore method testUpdateSystemInfo.

@Test
public void testUpdateSystemInfo() throws MetaStoreException {
    SystemInfo systemInfo = new SystemInfo("test", "test");
    metaStore.insertSystemInfo(systemInfo);
    SystemInfo newSystemInfo = new SystemInfo("test", "test1");
    metaStore.updateSystemInfo(newSystemInfo);
    Assert.assertTrue(metaStore.getSystemInfoByProperty("test").equals(newSystemInfo));
}
Also used : SystemInfo(org.smartdata.model.SystemInfo) Test(org.junit.Test)

Example 7 with SystemInfo

use of org.smartdata.model.SystemInfo in project SSM by Intel-bigdata.

the class TestSystemInfoDao method testUpdate.

@Test
public void testUpdate() {
    SystemInfo systemInfo = new SystemInfo("test", "test");
    systemInfoDao.insert(systemInfo);
    SystemInfo newSystemInfo = new SystemInfo("test", "test1");
    systemInfoDao.update(newSystemInfo);
    Assert.assertTrue(systemInfoDao.getByProperty("test").equals(newSystemInfo));
}
Also used : SystemInfo(org.smartdata.model.SystemInfo) Test(org.junit.Test)

Example 8 with SystemInfo

use of org.smartdata.model.SystemInfo in project SSM by Intel-bigdata.

the class TestSystemInfoDao method testInsertAndGet.

@Test
public void testInsertAndGet() {
    SystemInfo systemInfo = new SystemInfo("test", "test");
    systemInfoDao.insert(systemInfo);
    Assert.assertTrue(systemInfoDao.getByProperty("test").equals(systemInfo));
}
Also used : SystemInfo(org.smartdata.model.SystemInfo) Test(org.junit.Test)

Example 9 with SystemInfo

use of org.smartdata.model.SystemInfo in project SSM by Intel-bigdata.

the class TestSystemInfoDao method testBatchInsertAndQuery.

@Test
public void testBatchInsertAndQuery() {
    SystemInfo[] systemInfos = new SystemInfo[2];
    systemInfos[0] = new SystemInfo("test", "test");
    systemInfos[1] = new SystemInfo("test1", "test1");
    systemInfoDao.insert(systemInfos);
    List<SystemInfo> systemInfoList = systemInfoDao.getAll();
    for (int i = 0; i < 2; i++) {
        Assert.assertTrue(systemInfoList.get(i).equals(systemInfos[i]));
    }
}
Also used : SystemInfo(org.smartdata.model.SystemInfo) Test(org.junit.Test)

Aggregations

SystemInfo (org.smartdata.model.SystemInfo)9 Test (org.junit.Test)7 Date (java.util.Date)2 JournalEntry (alluxio.proto.journal.Journal.JournalEntry)1 EventBatch (org.apache.hadoop.hdfs.inotify.EventBatch)1