tsdbTests.cpp 485 字节
Newer Older
H
more  
hzcheng 已提交
1 2 3 4 5 6
#include <gtest/gtest.h>
#include <stdlib.h>

#include "tsdb.h"

TEST(TsdbTest, createTsdbRepo) {
H
more  
hzcheng 已提交
7
  STsdbCfg config;
H
more  
hzcheng 已提交
8

H
more  
hzcheng 已提交
9 10 11 12 13 14 15
  config.precision = TSDB_PRECISION_MILLI;
  config.tsdbId = 0;
  config.maxTables = 100;
  config.daysPerFile = 10;
  config.minRowsPerFileBlock = 100;
  config.maxRowsPerFileBlock = 4096;
  config.maxCacheSize = 4 * 1024 * 1024;
H
more  
hzcheng 已提交
16

H
more  
hzcheng 已提交
17 18 19 20 21
  tsdb_repo_t *pRepo = tsdbCreateRepo("/root/mnt/test/vnode0", &config, NULL);

  ASSERT_NE(pRepo, nullptr);

  tsdbCloseRepo(pRepo);
H
more  
hzcheng 已提交
22
}