Merge branch '3.0' into feature/vnode
This commit is contained in:
commit
be2958dc85
|
@ -106,6 +106,10 @@ pipeline {
|
|||
abortPreviousBuilds()
|
||||
}
|
||||
pre_test()
|
||||
sh'''
|
||||
cd ${WKC}/tests
|
||||
./test-all.sh b1fq
|
||||
'''
|
||||
}
|
||||
}
|
||||
// stage('Parallel test stage') {
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
# stub
|
||||
ExternalProject_Add(stub
|
||||
GIT_REPOSITORY https://github.com/coolxv/cpp-stub.git
|
||||
GIT_SUBMODULES "src"
|
||||
SOURCE_DIR "${CMAKE_CONTRIB_DIR}/cpp-stub"
|
||||
BINARY_DIR "${CMAKE_CONTRIB_DIR}/cpp-stub/src"
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
TEST_COMMAND ""
|
||||
)
|
|
@ -12,6 +12,7 @@ configure_file("${CMAKE_SUPPORT_DIR}/deps_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}
|
|||
# googletest
|
||||
if(${BUILD_TEST})
|
||||
cat("${CMAKE_SUPPORT_DIR}/gtest_CMakeLists.txt.in" ${CONTRIB_TMP_FILE})
|
||||
cat("${CMAKE_SUPPORT_DIR}/stub_CMakeLists.txt.in" ${CONTRIB_TMP_FILE})
|
||||
endif(${BUILD_TEST})
|
||||
|
||||
# lz4
|
||||
|
@ -79,6 +80,11 @@ execute_process(COMMAND "${CMAKE_COMMAND}" --build .
|
|||
# googletest
|
||||
if(${BUILD_TEST})
|
||||
add_subdirectory(googletest)
|
||||
target_include_directories(
|
||||
gtest
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/cpp-stub/src>
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/cpp-stub/src_linux>
|
||||
)
|
||||
endif(${BUILD_TEST})
|
||||
|
||||
# cJson
|
||||
|
|
|
@ -26,7 +26,19 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
// tfile header
|
||||
// |<---suid--->|<---version--->|<--colLen-->|<-colName->|<---type-->|
|
||||
// |<-uint64_t->|<---int32_t--->|<--int32_t->|<-colLen-->|<-uint8_t->|
|
||||
|
||||
typedef struct TFileReadHeader {
|
||||
uint64_t suid;
|
||||
int32_t version;
|
||||
char colName[128]; //
|
||||
uint8_t colType;
|
||||
} TFileReadHeader;
|
||||
|
||||
#define TFILE_HEADER_SIZE (sizeof(TFILE_HEADER_SIZE) + sizeof(uint32_t));
|
||||
#define TFILE_HADER_PRE_SIZE (sizeof(uint64_t) + sizeof(int32_t) + sizeof(int32_t))
|
||||
|
||||
typedef struct TFileCacheKey {
|
||||
uint64_t suid;
|
||||
|
@ -48,13 +60,13 @@ typedef struct TFileCache {
|
|||
|
||||
typedef struct TFileWriter {
|
||||
FstBuilder *fb;
|
||||
WriterCtx *wc;
|
||||
WriterCtx *ctx;
|
||||
} TFileWriter;
|
||||
|
||||
typedef struct TFileReader {
|
||||
T_REF_DECLARE()
|
||||
Fst *fst;
|
||||
|
||||
WriterCtx *ctx;
|
||||
} TFileReader;
|
||||
|
||||
typedef struct IndexTFile {
|
||||
|
@ -78,18 +90,22 @@ typedef struct TFileReaderOpt {
|
|||
|
||||
} TFileReaderOpt;
|
||||
|
||||
// tfile cache
|
||||
// tfile cache, manage tindex reader
|
||||
TFileCache *tfileCacheCreate(const char *path);
|
||||
void tfileCacheDestroy(TFileCache *tcache);
|
||||
TFileReader* tfileCacheGet(TFileCache *tcache, TFileCacheKey *key);
|
||||
void tfileCachePut(TFileCache *tcache, TFileCacheKey *key, TFileReader *reader);
|
||||
|
||||
TFileReader* tfileReaderCreate();
|
||||
void TFileReaderDestroy(TFileReader *reader);
|
||||
|
||||
|
||||
TFileWriter *tfileWriterCreate(const char *suid, const char *colName);
|
||||
void tfileWriterDestroy(TFileWriter *tw);
|
||||
|
||||
//
|
||||
IndexTFile *indexTFileCreate(const char *path);
|
||||
|
||||
int indexTFilePut(void *tfile, SIndexTerm *term, uint64_t uid);
|
||||
|
||||
int indexTFileSearch(void *tfile, SIndexTermQuery *query, SArray *result);
|
||||
|
||||
|
||||
|
|
|
@ -65,6 +65,7 @@ WriterCtx* writerCtxCreate(WriterType type, const char *path, bool readOnly, int
|
|||
ctx->file.fd = tfOpenReadWrite(tmpFile);
|
||||
}
|
||||
if (ctx->file.fd < 0) {
|
||||
goto END;
|
||||
indexError("open file error %d", errno);
|
||||
}
|
||||
} else if (ctx->type == TMemory) {
|
||||
|
@ -79,6 +80,9 @@ WriterCtx* writerCtxCreate(WriterType type, const char *path, bool readOnly, int
|
|||
ctx->limit = capacity;
|
||||
|
||||
return ctx;
|
||||
END:
|
||||
if (ctx->type == TMemory) { free(ctx->mem.buf); }
|
||||
free(ctx);
|
||||
}
|
||||
void writerCtxDestroy(WriterCtx *ctx) {
|
||||
if (ctx->type == TMemory) {
|
||||
|
|
|
@ -13,14 +13,38 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
//#include <sys/types.h>
|
||||
//#include <dirent.h>
|
||||
#include "index_tfile.h"
|
||||
#include "index_fst.h"
|
||||
#include "index_util.h"
|
||||
#include "taosdef.h"
|
||||
#include "index.h"
|
||||
#include "index_fst_counting_writer.h"
|
||||
|
||||
|
||||
// tfile name suid-colId-version.tindex
|
||||
static FORCE_INLINE int tfileLoadHeader(WriterCtx *ctx, TFileReadHeader *header) {
|
||||
//TODO simple tfile header later
|
||||
char buf[TFILE_HADER_PRE_SIZE];
|
||||
char *p = buf;
|
||||
int64_t nread = ctx->read(ctx, buf, TFILE_HADER_PRE_SIZE);
|
||||
assert(nread == TFILE_HADER_PRE_SIZE);
|
||||
|
||||
memcpy(&header->suid, p, sizeof(header->suid));
|
||||
p += sizeof(header->suid);
|
||||
|
||||
memcpy(&header->version, p, sizeof(header->version));
|
||||
p += sizeof(header->version);
|
||||
|
||||
int32_t colLen = 0;
|
||||
memcpy(&colLen, p, sizeof(colLen));
|
||||
assert(colLen < sizeof(header->colName));
|
||||
nread = ctx->read(ctx, header->colName, colLen);
|
||||
assert(nread == colLen);
|
||||
|
||||
nread = ctx->read(ctx, &header->colType, sizeof(header->colType));
|
||||
return 0;
|
||||
};
|
||||
static int tfileGetFileList(const char *path, SArray *result) {
|
||||
DIR *dir = opendir(path);
|
||||
if (NULL == dir) { return -1; }
|
||||
|
@ -35,6 +59,10 @@ static int tfileGetFileList(const char *path, SArray *result) {
|
|||
closedir(dir);
|
||||
return 0;
|
||||
}
|
||||
static void tfileDestroyFileName(void *elem) {
|
||||
char *p = *(char **)elem;
|
||||
free(p);
|
||||
}
|
||||
static int tfileCompare(const void *a, const void *b) {
|
||||
const char *aName = *(char **)a;
|
||||
const char *bName = *(char **)b;
|
||||
|
@ -42,6 +70,7 @@ static int tfileCompare(const void *a, const void *b) {
|
|||
size_t bLen = strlen(bName);
|
||||
return strncmp(aName, bName, aLen > bLen ? aLen : bLen);
|
||||
}
|
||||
// tfile name suid-colId-version.tindex
|
||||
static int tfileParseFileName(const char *filename, uint64_t *suid, int *colId, int *version) {
|
||||
if (3 == sscanf(filename, "%" PRIu64 "-%d-%d.tindex", suid, colId, version)) {
|
||||
// read suid & colid & version success
|
||||
|
@ -74,14 +103,28 @@ TFileCache *tfileCacheCreate(const char *path) {
|
|||
uint64_t suid;
|
||||
int colId, version;
|
||||
if (0 != tfileParseFileName(file, &suid, &colId, &version)) {
|
||||
// invalid file, just skip
|
||||
goto End;
|
||||
continue;
|
||||
}
|
||||
free((void *)file);
|
||||
|
||||
TFileReader *reader = calloc(1, sizeof(TFileReader));
|
||||
reader->ctx = writerCtxCreate(TFile, file, true, 1024 * 64);
|
||||
if (reader->ctx == NULL) {
|
||||
TFileReaderDestroy(reader);
|
||||
indexError("failed to open index: %s", file);
|
||||
goto End;
|
||||
}
|
||||
TFileReadHeader header = {0};
|
||||
if (0 != tfileLoadHeader(reader->ctx, &header)) {
|
||||
TFileReaderDestroy(reader);
|
||||
indexError("failed to load index header, index Id: %s", file);
|
||||
}
|
||||
}
|
||||
taosArrayDestroy(files);
|
||||
|
||||
taosArrayDestroyEx(files, tfileDestroyFileName);
|
||||
return tcache;
|
||||
End:
|
||||
taosArrayDestroyEx(files, tfileDestroyFileName);
|
||||
return NULL;
|
||||
}
|
||||
void tfileCacheDestroy(TFileCache *tcache) {
|
||||
|
||||
|
@ -103,13 +146,25 @@ void tfileCachePut(TFileCache *tcache, TFileCacheKey *key, TFileReader *reader)
|
|||
}
|
||||
|
||||
|
||||
TFileReader* tfileReaderCreate() {
|
||||
|
||||
}
|
||||
void TFileReaderDestroy(TFileReader *reader) {
|
||||
if (reader == NULL) { return; }
|
||||
|
||||
writerCtxDestroy(reader->ctx);
|
||||
free(reader);
|
||||
}
|
||||
|
||||
|
||||
TFileWriter *tfileWriterCreate(const char *suid, const char *colName);
|
||||
void tfileWriterDestroy(TFileWriter *tw);
|
||||
|
||||
|
||||
IndexTFile *indexTFileCreate(const char *path) {
|
||||
IndexTFile *tfile = calloc(1, sizeof(IndexTFile));
|
||||
tfile->cache = tfileCacheCreate(path);
|
||||
|
||||
|
||||
return tfile;
|
||||
}
|
||||
void IndexTFileDestroy(IndexTFile *tfile) {
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
#include "stub.h"
|
||||
#include "addr_any.h"
|
||||
|
||||
namespace {
|
||||
|
||||
void generateTestT1(MockCatalogService* mcs) {
|
||||
|
@ -38,16 +41,36 @@ void generateTestST1(MockCatalogService* mcs) {
|
|||
|
||||
}
|
||||
|
||||
int32_t catalogGetHandle(const char *clusterId, struct SCatalog** catalogHandle) {
|
||||
int32_t __catalogGetHandle(const char *clusterId, struct SCatalog** catalogHandle) {
|
||||
return mockCatalogService->catalogGetHandle(clusterId, catalogHandle);
|
||||
}
|
||||
|
||||
int32_t catalogGetTableMeta(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, const char* pDBName, const char* pTableName, STableMeta** pTableMeta) {
|
||||
int32_t __catalogGetTableMeta(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, const char* pDBName, const char* pTableName, STableMeta** pTableMeta) {
|
||||
return mockCatalogService->catalogGetTableMeta(pCatalog, pRpc, pMgmtEps, pDBName, pTableName, pTableMeta);
|
||||
}
|
||||
|
||||
void initMetaDataEnv() {
|
||||
mockCatalogService.reset(new MockCatalogService());
|
||||
|
||||
static Stub stub;
|
||||
stub.set(catalogGetHandle, __catalogGetHandle);
|
||||
stub.set(catalogGetTableMeta, __catalogGetTableMeta);
|
||||
{
|
||||
AddrAny any("libcatalog.so");
|
||||
std::map<std::string,void*> result;
|
||||
any.get_global_func_addr_dynsym("^catalogGetHandle$", result);
|
||||
for (const auto& f : result) {
|
||||
stub.set(f.second, __catalogGetHandle);
|
||||
}
|
||||
}
|
||||
{
|
||||
AddrAny any("libcatalog.so");
|
||||
std::map<std::string,void*> result;
|
||||
any.get_global_func_addr_dynsym("^catalogGetTableMeta$", result);
|
||||
for (const auto& f : result) {
|
||||
stub.set(f.second, __catalogGetTableMeta);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void generateMetaData() {
|
||||
|
|
|
@ -23,7 +23,7 @@ void generateMetaData();
|
|||
void destroyMetaDataEnv();
|
||||
|
||||
// mock
|
||||
int32_t catalogGetHandle(const char *clusterId, struct SCatalog** catalogHandle);
|
||||
int32_t catalogGetTableMeta(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, const char* pDBName, const char* pTableName, STableMeta** pTableMeta);
|
||||
// int32_t catalogGetHandle(const char *clusterId, struct SCatalog** catalogHandle);
|
||||
// int32_t catalogGetTableMeta(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, const char* pDBName, const char* pTableName, STableMeta** pTableMeta);
|
||||
|
||||
#endif // MOCK_CATALOG_H
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#pragma GCC diagnostic ignored "-Wsign-compare"
|
||||
|
||||
class ParserEnv : public testing::Environment {
|
||||
class PlannerEnv : public testing::Environment {
|
||||
public:
|
||||
virtual void SetUp() {
|
||||
initMetaDataEnv();
|
||||
|
@ -39,12 +39,12 @@ public:
|
|||
destroyMetaDataEnv();
|
||||
}
|
||||
|
||||
ParserEnv() {}
|
||||
virtual ~ParserEnv() {}
|
||||
PlannerEnv() {}
|
||||
virtual ~PlannerEnv() {}
|
||||
};
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
testing::AddGlobalTestEnvironment(new ParserEnv());
|
||||
testing::AddGlobalTestEnvironment(new PlannerEnv());
|
||||
testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
|
|
|
@ -1,417 +1,7 @@
|
|||
cd ../../../debug; cmake ..
|
||||
cd ../../../debug; make
|
||||
|
||||
#======================b1-start===============
|
||||
|
||||
./test.sh -f general/field/2.sim
|
||||
./test.sh -f general/field/3.sim
|
||||
./test.sh -f general/field/4.sim
|
||||
./test.sh -f general/field/5.sim
|
||||
./test.sh -f general/field/6.sim
|
||||
./test.sh -f general/field/bigint.sim
|
||||
./test.sh -f general/field/binary.sim
|
||||
./test.sh -f general/field/bool.sim
|
||||
./test.sh -f general/field/single.sim
|
||||
./test.sh -f general/field/smallint.sim
|
||||
./test.sh -f general/field/tinyint.sim
|
||||
./test.sh -f general/user/basic1.sim
|
||||
|
||||
./test.sh -f general/http/autocreate.sim
|
||||
./test.sh -f general/http/chunked.sim
|
||||
./test.sh -f general/http/gzip.sim
|
||||
./test.sh -f general/http/restful.sim
|
||||
./test.sh -f general/http/restful_insert.sim
|
||||
./test.sh -f general/http/restful_limit.sim
|
||||
./test.sh -f general/http/restful_full.sim
|
||||
./test.sh -f general/http/prepare.sim
|
||||
./test.sh -f general/http/telegraf.sim
|
||||
./test.sh -f general/http/grafana_bug.sim
|
||||
./test.sh -f general/http/grafana.sim
|
||||
|
||||
./test.sh -f general/insert/basic.sim
|
||||
./test.sh -f general/insert/insert_drop.sim
|
||||
./test.sh -f general/insert/query_block1_memory.sim
|
||||
./test.sh -f general/insert/query_block2_memory.sim
|
||||
./test.sh -f general/insert/query_block1_file.sim
|
||||
./test.sh -f general/insert/query_block2_file.sim
|
||||
./test.sh -f general/insert/query_file_memory.sim
|
||||
./test.sh -f general/insert/query_multi_file.sim
|
||||
./test.sh -f general/insert/tcp.sim
|
||||
|
||||
./test.sh -f general/parser/alter.sim
|
||||
./test.sh -f general/parser/alter1.sim
|
||||
./test.sh -f general/parser/alter_stable.sim
|
||||
./test.sh -f general/parser/auto_create_tb.sim
|
||||
./test.sh -f general/parser/auto_create_tb_drop_tb.sim
|
||||
./test.sh -f general/parser/col_arithmetic_operation.sim
|
||||
./test.sh -f general/parser/columnValue.sim
|
||||
./test.sh -f general/parser/commit.sim
|
||||
./test.sh -f general/parser/create_db.sim
|
||||
./test.sh -f general/parser/create_mt.sim
|
||||
./test.sh -f general/parser/create_tb.sim
|
||||
./test.sh -f general/parser/dbtbnameValidate.sim
|
||||
./test.sh -f general/parser/import_commit1.sim
|
||||
./test.sh -f general/parser/import_commit2.sim
|
||||
./test.sh -f general/parser/import_commit3.sim
|
||||
./test.sh -f general/parser/insert_tb.sim
|
||||
./test.sh -f general/parser/first_last.sim
|
||||
./test.sh -f general/parser/lastrow.sim
|
||||
./test.sh -f general/parser/nchar.sim
|
||||
./test.sh -f general/parser/null_char.sim
|
||||
./test.sh -f general/parser/single_row_in_tb.sim
|
||||
./test.sh -f general/parser/select_from_cache_disk.sim
|
||||
./test.sh -f general/parser/mixed_blocks.sim
|
||||
./test.sh -f general/parser/selectResNum.sim
|
||||
./test.sh -f general/parser/limit.sim
|
||||
./test.sh -f general/parser/limit1.sim
|
||||
./test.sh -f general/parser/limit1_tblocks100.sim
|
||||
./test.sh -f general/parser/select_across_vnodes.sim
|
||||
./test.sh -f general/parser/slimit1.sim
|
||||
./test.sh -f general/parser/tbnameIn.sim
|
||||
./test.sh -f general/parser/projection_limit_offset.sim
|
||||
./test.sh -f general/parser/limit2.sim
|
||||
./test.sh -f general/parser/fill.sim
|
||||
./test.sh -f general/parser/fill_stb.sim
|
||||
./test.sh -f general/parser/where.sim
|
||||
./test.sh -f general/parser/slimit.sim
|
||||
./test.sh -f general/parser/select_with_tags.sim
|
||||
./test.sh -f general/parser/interp.sim
|
||||
./test.sh -f general/parser/tags_dynamically_specifiy.sim
|
||||
./test.sh -f general/parser/groupby.sim
|
||||
./test.sh -f general/parser/set_tag_vals.sim
|
||||
./test.sh -f general/parser/tags_filter.sim
|
||||
./test.sh -f general/parser/slimit_alter_tags.sim
|
||||
./test.sh -f general/parser/join.sim
|
||||
./test.sh -f general/parser/join_multivnode.sim
|
||||
./test.sh -f general/parser/binary_escapeCharacter.sim
|
||||
./test.sh -f general/parser/repeatAlter.sim
|
||||
./test.sh -f general/parser/union.sim
|
||||
./test.sh -f general/parser/topbot.sim
|
||||
./test.sh -f general/db/nosuchfile.sim
|
||||
./test.sh -f general/parser/function.sim
|
||||
./test.sh -f unique/cluster/vgroup100.sim
|
||||
|
||||
./test.sh -f unique/http/admin.sim
|
||||
./test.sh -f unique/http/opentsdb.sim
|
||||
|
||||
./test.sh -f unique/import/replica2.sim
|
||||
./test.sh -f unique/import/replica3.sim
|
||||
|
||||
./test.sh -f general/alter/cached_schema_after_alter.sim
|
||||
|
||||
#======================b1-end===============
|
||||
#======================b2-start===============
|
||||
|
||||
|
||||
./test.sh -f general/wal/sync.sim
|
||||
./test.sh -f general/wal/kill.sim
|
||||
./test.sh -f general/wal/maxtables.sim
|
||||
|
||||
./test.sh -f general/user/authority.sim
|
||||
./test.sh -f general/user/monitor.sim
|
||||
./test.sh -f general/user/pass_alter.sim
|
||||
./test.sh -f general/user/pass_len.sim
|
||||
./test.sh -f general/user/user_create.sim
|
||||
./test.sh -f general/user/user_len.sim
|
||||
|
||||
./test.sh -f general/vector/metrics_field.sim
|
||||
./test.sh -f general/vector/metrics_mix.sim
|
||||
./test.sh -f general/vector/metrics_query.sim
|
||||
./test.sh -f general/vector/metrics_tag.sim
|
||||
./test.sh -f general/vector/metrics_time.sim
|
||||
./test.sh -f general/vector/multi.sim
|
||||
./test.sh -f general/vector/single.sim
|
||||
./test.sh -f general/vector/table_field.sim
|
||||
./test.sh -f general/vector/table_mix.sim
|
||||
./test.sh -f general/vector/table_query.sim
|
||||
./test.sh -f general/vector/table_time.sim
|
||||
|
||||
./test.sh -f unique/account/account_create.sim
|
||||
./test.sh -f unique/account/account_delete.sim
|
||||
./test.sh -f unique/account/account_len.sim
|
||||
./test.sh -f unique/account/authority.sim
|
||||
./test.sh -f unique/account/basic.sim
|
||||
./test.sh -f unique/account/paras.sim
|
||||
./test.sh -f unique/account/pass_alter.sim
|
||||
./test.sh -f unique/account/pass_len.sim
|
||||
./test.sh -f unique/account/usage.sim
|
||||
./test.sh -f unique/account/user_create.sim
|
||||
./test.sh -f unique/account/user_len.sim
|
||||
|
||||
./test.sh -f unique/big/maxvnodes.sim
|
||||
./test.sh -f unique/big/tcp.sim
|
||||
|
||||
./test.sh -f unique/cluster/alter.sim
|
||||
./test.sh -f unique/cluster/cache.sim
|
||||
./test.sh -f unique/http/admin.sim
|
||||
./test.sh -f unique/http/opentsdb.sim
|
||||
|
||||
./test.sh -f unique/import/replica2.sim
|
||||
./test.sh -f unique/import/replica3.sim
|
||||
|
||||
./test.sh -f general/alter/cached_schema_after_alter.sim
|
||||
|
||||
|
||||
#======================b2-end===============
|
||||
#======================b3-start===============
|
||||
|
||||
./test.sh -f unique/arbitrator/check_cluster_cfg_para.sim
|
||||
#./test.sh -f unique/arbitrator/dn2_mn1_cache_file_sync.sim
|
||||
./test.sh -f unique/arbitrator/dn3_mn1_full_createTableFail.sim
|
||||
./test.sh -f unique/arbitrator/dn3_mn1_multiCreateDropTable.sim
|
||||
#./test.sh -f unique/arbitrator/dn3_mn1_nw_disable_timeout_autoDropDnode.sim
|
||||
#./test.sh -f unique/arbitrator/dn3_mn1_replica2_wal1_AddDelDnode.sim
|
||||
./test.sh -f unique/arbitrator/dn3_mn1_replica_change_dropDnod.sim
|
||||
./test.sh -f unique/arbitrator/dn3_mn1_replica_change.sim
|
||||
#./test.sh -f unique/arbitrator/dn3_mn1_stopDnode_timeout.sim
|
||||
# lower the priority while file corruption
|
||||
#./test.sh -f unique/arbitrator/dn3_mn1_vnode_change.sim
|
||||
#./test.sh -f unique/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim
|
||||
#./test.sh -f unique/arbitrator/dn3_mn1_vnode_corruptFile_online.sim
|
||||
#./test.sh -f unique/arbitrator/dn3_mn1_vnode_createErrData_online.sim
|
||||
./test.sh -f unique/arbitrator/dn3_mn1_vnode_noCorruptFile_offline.sim
|
||||
./test.sh -f unique/arbitrator/dn3_mn1_vnode_delDir.sim
|
||||
./test.sh -f unique/arbitrator/dn3_mn1_r2_vnode_delDir.sim
|
||||
./test.sh -f unique/arbitrator/dn3_mn1_r3_vnode_delDir.sim
|
||||
./test.sh -f unique/arbitrator/dn3_mn1_vnode_nomaster.sim
|
||||
./test.sh -f unique/arbitrator/dn3_mn2_killDnode.sim
|
||||
|
||||
./test.sh -f unique/arbitrator/offline_replica2_alterTable_online.sim
|
||||
./test.sh -f unique/arbitrator/offline_replica2_alterTag_online.sim
|
||||
./test.sh -f unique/arbitrator/offline_replica2_createTable_online.sim
|
||||
./test.sh -f unique/arbitrator/offline_replica2_dropDb_online.sim
|
||||
./test.sh -f unique/arbitrator/offline_replica2_dropTable_online.sim
|
||||
./test.sh -f unique/arbitrator/offline_replica3_alterTable_online.sim
|
||||
./test.sh -f unique/arbitrator/offline_replica3_alterTag_online.sim
|
||||
./test.sh -f unique/arbitrator/offline_replica3_createTable_online.sim
|
||||
./test.sh -f unique/arbitrator/offline_replica3_dropDb_online.sim
|
||||
./test.sh -f unique/arbitrator/offline_replica3_dropTable_online.sim
|
||||
./test.sh -f unique/arbitrator/replica_changeWithArbitrator.sim
|
||||
./test.sh -f unique/arbitrator/sync_replica2_alterTable_add.sim
|
||||
./test.sh -f unique/arbitrator/sync_replica2_alterTable_drop.sim
|
||||
|
||||
./test.sh -f unique/arbitrator/sync_replica2_dropDb.sim
|
||||
./test.sh -f unique/arbitrator/sync_replica2_dropTable.sim
|
||||
./test.sh -f unique/arbitrator/sync_replica3_alterTable_add.sim
|
||||
./test.sh -f unique/arbitrator/sync_replica3_alterTable_drop.sim
|
||||
./test.sh -f unique/arbitrator/sync_replica3_dropDb.sim
|
||||
./test.sh -f unique/arbitrator/sync_replica3_dropTable.sim
|
||||
|
||||
./test.sh -f unique/migrate/mn2_vn2_repl2_rmMnodeDir.sim
|
||||
./test.sh -f unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir.sim
|
||||
./test.sh -f unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir_stopAll_starAll.sim
|
||||
./test.sh -f unique/migrate/mn2_vn2_repl2_rmVnodeDir.sim
|
||||
|
||||
./test.sh -f unique/stable/balance_replica1.sim
|
||||
./test.sh -f unique/stable/dnode2_stop.sim
|
||||
./test.sh -f unique/stable/dnode2.sim
|
||||
./test.sh -f unique/stable/dnode3.sim
|
||||
./test.sh -f unique/stable/replica2_dnode4.sim
|
||||
./test.sh -f unique/stable/replica2_vnode3.sim
|
||||
./test.sh -f unique/stable/replica3_dnode6.sim
|
||||
./test.sh -f unique/stable/replica3_vnode3.sim
|
||||
|
||||
#======================b3-end===============
|
||||
#======================b4-start===============
|
||||
|
||||
|
||||
./test.sh -f general/alter/count.sim
|
||||
./test.sh -f general/alter/dnode.sim
|
||||
./test.sh -f general/alter/import.sim
|
||||
./test.sh -f general/alter/insert1.sim
|
||||
./test.sh -f general/alter/insert2.sim
|
||||
./test.sh -f general/alter/metrics.sim
|
||||
./test.sh -f general/alter/table.sim
|
||||
|
||||
./test.sh -f general/cache/new_metrics.sim
|
||||
./test.sh -f general/cache/restart_metrics.sim
|
||||
./test.sh -f general/cache/restart_table.sim
|
||||
|
||||
./test.sh -f general/connection/connection.sim
|
||||
|
||||
./test.sh -f general/column/commit.sim
|
||||
./test.sh -f general/column/metrics.sim
|
||||
./test.sh -f general/column/table.sim
|
||||
|
||||
./test.sh -f general/compress/commitlog.sim
|
||||
./test.sh -f general/compress/compress.sim
|
||||
./test.sh -f general/compress/compress2.sim
|
||||
./test.sh -f general/compress/uncompress.sim
|
||||
|
||||
./test.sh -f general/stable/disk.sim
|
||||
./test.sh -f general/stable/dnode3.sim
|
||||
./test.sh -f general/stable/metrics.sim
|
||||
./test.sh -f general/stable/refcount.sim
|
||||
./test.sh -f general/stable/show.sim
|
||||
./test.sh -f general/stable/values.sim
|
||||
./test.sh -f general/stable/vnode3.sim
|
||||
|
||||
./test.sh -f unique/column/replica3.sim
|
||||
./test.sh -f issue/TD-2713.sim
|
||||
./test.sh -f general/parser/select_distinct_tag.sim
|
||||
./test.sh -f unique/mnode/mgmt30.sim
|
||||
./test.sh -f issue/TD-2677.sim
|
||||
./test.sh -f issue/TD-2680.sim
|
||||
./test.sh -f unique/dnode/lossdata.sim
|
||||
|
||||
#======================b4-end===============
|
||||
#======================b5-start===============
|
||||
|
||||
./test.sh -f unique/dnode/alternativeRole.sim
|
||||
./test.sh -f unique/dnode/balance1.sim
|
||||
./test.sh -f unique/dnode/balance2.sim
|
||||
./test.sh -f unique/dnode/balance3.sim
|
||||
./test.sh -f unique/dnode/balancex.sim
|
||||
./test.sh -f unique/dnode/offline1.sim
|
||||
./test.sh -f unique/dnode/offline2.sim
|
||||
|
||||
./test.sh -f general/stream/metrics_del.sim
|
||||
./test.sh -f general/stream/metrics_replica1_vnoden.sim
|
||||
./test.sh -f general/stream/restart_stream.sim
|
||||
./test.sh -f general/stream/stream_3.sim
|
||||
./test.sh -f general/stream/stream_restart.sim
|
||||
./test.sh -f general/stream/table_del.sim
|
||||
./test.sh -f general/stream/table_replica1_vnoden.sim
|
||||
|
||||
./test.sh -f general/connection/test_old_data.sim
|
||||
./test.sh -f unique/dnode/datatrans_3node.sim
|
||||
./test.sh -f unique/dnode/datatrans_3node_2.sim
|
||||
./test.sh -f general/db/alter_tables_d2.sim
|
||||
./test.sh -f general/db/alter_tables_v1.sim
|
||||
./test.sh -f general/db/alter_tables_v4.sim
|
||||
|
||||
#======================b5-end===============
|
||||
#======================b6-start===============
|
||||
|
||||
./test.sh -f unique/dnode/reason.sim
|
||||
./test.sh -f unique/dnode/remove1.sim
|
||||
./test.sh -f unique/dnode/remove2.sim
|
||||
./test.sh -f unique/dnode/vnode_clean.sim
|
||||
|
||||
./test.sh -f unique/db/commit.sim
|
||||
./test.sh -f unique/db/delete.sim
|
||||
./test.sh -f unique/db/delete_part.sim
|
||||
./test.sh -f unique/db/replica_add12.sim
|
||||
./test.sh -f unique/db/replica_add13.sim
|
||||
./test.sh -f unique/db/replica_add23.sim
|
||||
./test.sh -f unique/db/replica_reduce21.sim
|
||||
./test.sh -f unique/db/replica_reduce32.sim
|
||||
./test.sh -f unique/db/replica_reduce31.sim
|
||||
./test.sh -f unique/db/replica_part.sim
|
||||
|
||||
./test.sh -f unique/vnode/many.sim
|
||||
./test.sh -f unique/vnode/replica2_basic2.sim
|
||||
./test.sh -f unique/vnode/replica2_repeat.sim
|
||||
./test.sh -f unique/vnode/replica3_basic.sim
|
||||
./test.sh -f unique/vnode/replica3_repeat.sim
|
||||
./test.sh -f unique/vnode/replica3_vgroup.sim
|
||||
|
||||
./test.sh -f unique/dnode/monitor.sim
|
||||
./test.sh -f unique/dnode/monitor_bug.sim
|
||||
./test.sh -f unique/dnode/simple.sim
|
||||
./test.sh -f unique/dnode/data1.sim
|
||||
./test.sh -f unique/dnode/m2.sim
|
||||
./test.sh -f unique/dnode/m3.sim
|
||||
./test.sh -f unique/dnode/offline3.sim
|
||||
./test.sh -f general/wal/kill.sim
|
||||
./test.sh -f general/wal/maxtables.sim
|
||||
|
||||
./test.sh -f general/import/basic.sim
|
||||
./test.sh -f general/import/commit.sim
|
||||
./test.sh -f general/import/large.sim
|
||||
./test.sh -f general/import/replica1.sim
|
||||
./test.sh -f unique/cluster/balance1.sim
|
||||
./test.sh -f unique/cluster/balance2.sim
|
||||
./test.sh -f unique/cluster/balance3.sim
|
||||
|
||||
#======================b6-end===============
|
||||
#======================b7-start===============
|
||||
|
||||
./test.sh -f general/compute/avg.sim
|
||||
./test.sh -f general/compute/bottom.sim
|
||||
./test.sh -f general/compute/count.sim
|
||||
./test.sh -f general/compute/diff.sim
|
||||
./test.sh -f general/compute/diff2.sim
|
||||
./test.sh -f general/compute/first.sim
|
||||
./test.sh -f general/compute/interval.sim
|
||||
./test.sh -f general/compute/last.sim
|
||||
./test.sh -f general/compute/leastsquare.sim
|
||||
./test.sh -f general/compute/max.sim
|
||||
./test.sh -f general/compute/min.sim
|
||||
./test.sh -f general/compute/null.sim
|
||||
./test.sh -f general/compute/percentile.sim
|
||||
./test.sh -f general/compute/stddev.sim
|
||||
./test.sh -f general/compute/sum.sim
|
||||
./test.sh -f general/compute/top.sim
|
||||
|
||||
./test.sh -f general/db/alter_option.sim
|
||||
./test.sh -f general/db/alter_vgroups.sim
|
||||
./test.sh -f general/db/basic.sim
|
||||
./test.sh -f general/db/basic1.sim
|
||||
./test.sh -f general/db/basic2.sim
|
||||
./test.sh -f general/db/basic3.sim
|
||||
./test.sh -f general/db/basic4.sim
|
||||
./test.sh -f general/db/basic5.sim
|
||||
./test.sh -f general/db/delete_reuse1.sim
|
||||
./test.sh -f general/db/delete_reuse2.sim
|
||||
./test.sh -f general/db/delete_reusevnode.sim
|
||||
./test.sh -f general/db/delete_reusevnode2.sim
|
||||
./test.sh -f general/db/delete_writing1.sim
|
||||
./test.sh -f general/db/delete_writing2.sim
|
||||
./test.sh -f general/db/delete.sim
|
||||
./test.sh -f general/db/len.sim
|
||||
./test.sh -f general/db/repeat.sim
|
||||
./test.sh -f general/db/tables.sim
|
||||
./test.sh -f general/db/vnodes.sim
|
||||
./test.sh -f general/db/topic1.sim
|
||||
./test.sh -f general/db/topic2.sim
|
||||
./test.sh -f general/table/autocreate.sim
|
||||
./test.sh -f general/table/basic1.sim
|
||||
./test.sh -f general/table/basic2.sim
|
||||
./test.sh -f general/table/basic3.sim
|
||||
./test.sh -f general/table/bigint.sim
|
||||
./test.sh -f general/table/binary.sim
|
||||
./test.sh -f general/table/bool.sim
|
||||
./test.sh -f general/table/column_name.sim
|
||||
./test.sh -f general/table/column_num.sim
|
||||
./test.sh -f general/table/column_value.sim
|
||||
./test.sh -f general/table/column2.sim
|
||||
./test.sh -f general/table/date.sim
|
||||
./test.sh -f general/table/db.table.sim
|
||||
./test.sh -f general/table/delete_reuse1.sim
|
||||
./test.sh -f general/table/delete_reuse2.sim
|
||||
./test.sh -f general/table/delete_writing.sim
|
||||
./test.sh -f general/table/describe.sim
|
||||
./test.sh -f general/table/double.sim
|
||||
./test.sh -f general/table/float.sim
|
||||
./test.sh -f general/table/int.sim
|
||||
./test.sh -f general/table/limit.sim
|
||||
./test.sh -f general/table/smallint.sim
|
||||
./test.sh -f general/table/table_len.sim
|
||||
./test.sh -f general/table/table.sim
|
||||
./test.sh -f general/table/tinyint.sim
|
||||
./test.sh -f general/table/vgroup.sim
|
||||
./test.sh -f general/table/createmulti.sim
|
||||
|
||||
./test.sh -f unique/mnode/mgmt20.sim
|
||||
./test.sh -f unique/mnode/mgmt21.sim
|
||||
./test.sh -f unique/mnode/mgmt22.sim
|
||||
./test.sh -f unique/mnode/mgmt23.sim
|
||||
./test.sh -f unique/mnode/mgmt24.sim
|
||||
./test.sh -f unique/mnode/mgmt25.sim
|
||||
./test.sh -f unique/mnode/mgmt26.sim
|
||||
./test.sh -f unique/mnode/mgmt33.sim
|
||||
./test.sh -f unique/mnode/mgmt34.sim
|
||||
./test.sh -f unique/mnode/mgmtr2.sim
|
||||
|
||||
./test.sh -f unique/arbitrator/insert_duplicationTs.sim
|
||||
./test.sh -f general/parser/join_manyblocks.sim
|
||||
./test.sh -f general/parser/stableOp.sim
|
||||
./test.sh -f general/parser/timestamp.sim
|
||||
./test.sh -f general/parser/sliding.sim
|
||||
./test.sh -f general/parser/having.sim
|
||||
./test.sh -f general/parser/having_child.sim
|
||||
./test.sh -f general/parser/between_and.sim
|
||||
./test.sh -f general/parser/last_cache.sim
|
||||
./test.sh -f unique/big/balance.sim
|
||||
|
||||
#======================b7-end===============
|
||||
|
|
|
@ -41,7 +41,7 @@ function dohavecore(){
|
|||
else
|
||||
cd ../../
|
||||
if [[ $1 == 1 ]];then
|
||||
tar -zcPf $corepath'taos_'`date "+%Y_%m_%d_%H_%M_%S"`.tar.gz debug/build/bin/taosd debug/build/bin/tsim debug/build/lib/libtaos*so*
|
||||
#tar -zcPf $corepath'taos_'`date "+%Y_%m_%d_%H_%M_%S"`.tar.gz debug
|
||||
cp -r sim ~/sim_`date "+%Y_%m_%d_%H:%M:%S" `
|
||||
fi
|
||||
fi
|
||||
|
@ -67,8 +67,8 @@ function runSimCaseOneByOne {
|
|||
else
|
||||
echo -n $case
|
||||
./test.sh -f $case > /dev/null 2>&1 && \
|
||||
( grep -q 'script.*'$case'.*failed.*, err.*lineNum' ../../sim/tsim/log/taoslog0.0 && echo -e "${RED} failed${NC}" | tee -a out.log || echo -e "${GREEN} success${NC}" | tee -a out.log )|| \
|
||||
( grep -q 'script.*success.*m$' ../../sim/tsim/log/taoslog0.0 && echo -e "${GREEN} success${NC}" | tee -a out.log ) || \
|
||||
( grep -q 'script.*'$case'.*failed.*, err.*lineNum' ../sim/tsim/log/taoslog0.0 && echo -e "${RED} failed${NC}" | tee -a out.log || echo -e "${GREEN} success${NC}" | tee -a out.log )|| \
|
||||
( grep -q 'script.*success.*m$' ../sim/tsim/log/taoslog0.0 && echo -e "${GREEN} success${NC}" | tee -a out.log ) || \
|
||||
echo -e "${RED} failed${NC}" | tee -a out.log
|
||||
fi
|
||||
out_log=`tail -1 out.log `
|
||||
|
@ -99,11 +99,12 @@ function runSimCaseOneByOnefq {
|
|||
( grep -q 'script.*success.*m$' ../../../sim/tsim/log/taoslog0.0 && echo -e "${GREEN} success${NC}" | tee -a out.log ) || \
|
||||
( echo -e "${RED} failed${NC}" | tee -a out.log && echo '=====================log=====================' && cat case.log )
|
||||
else
|
||||
pwd
|
||||
echo -n $case
|
||||
./test.sh -f $case > ../../sim/case.log 2>&1 && \
|
||||
( grep -q 'script.*'$case'.*failed.*, err.*lineNum' ../../sim/tsim/log/taoslog0.0 && echo -e "${RED} failed${NC}" | tee -a out.log || echo -e "${GREEN} success${NC}" | tee -a out.log )|| \
|
||||
( grep -q 'script.*success.*m$' ../../sim/tsim/log/taoslog0.0 && echo -e "${GREEN} success${NC}" | tee -a out.log ) || \
|
||||
( echo -e "${RED} failed${NC}" | tee -a out.log && echo '=====================log=====================' && cat case.log )
|
||||
( echo -e "${RED} failed${NC}" | tee -a out.log && echo '=====================log=====================' && pwd && cat ../../sim/case.log )
|
||||
fi
|
||||
|
||||
out_log=`tail -1 out.log `
|
||||
|
|
Loading…
Reference in New Issue