Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
fba45da2
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
fba45da2
编写于
11月 10, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refact: remove assert and adjust log
上级
f7d26386
变更
61
隐藏空白更改
内联
并排
Showing
61 changed file
with
58 addition
and
380 deletion
+58
-380
source/libs/sync/src/syncVoteMgr.c
source/libs/sync/src/syncVoteMgr.c
+6
-6
source/libs/sync/test/syncAppendEntriesBatchTest.cpp
source/libs/sync/test/syncAppendEntriesBatchTest.cpp
+0
-7
source/libs/sync/test/syncAppendEntriesReplyTest.cpp
source/libs/sync/test/syncAppendEntriesReplyTest.cpp
+1
-5
source/libs/sync/test/syncAppendEntriesTest.cpp
source/libs/sync/test/syncAppendEntriesTest.cpp
+1
-5
source/libs/sync/test/syncApplyMsgTest.cpp
source/libs/sync/test/syncApplyMsgTest.cpp
+1
-5
source/libs/sync/test/syncConfigChangeSnapshotTest.cpp
source/libs/sync/test/syncConfigChangeSnapshotTest.cpp
+1
-7
source/libs/sync/test/syncConfigChangeTest.cpp
source/libs/sync/test/syncConfigChangeTest.cpp
+1
-7
source/libs/sync/test/syncElectTest.cpp
source/libs/sync/test/syncElectTest.cpp
+1
-6
source/libs/sync/test/syncEncodeTest.cpp
source/libs/sync/test/syncEncodeTest.cpp
+0
-10
source/libs/sync/test/syncEnqTest.cpp
source/libs/sync/test/syncEnqTest.cpp
+1
-6
source/libs/sync/test/syncEntryCacheTest.cpp
source/libs/sync/test/syncEntryCacheTest.cpp
+0
-9
source/libs/sync/test/syncEntryTest.cpp
source/libs/sync/test/syncEntryTest.cpp
+0
-8
source/libs/sync/test/syncEnvTest.cpp
source/libs/sync/test/syncEnvTest.cpp
+1
-6
source/libs/sync/test/syncHashCacheTest.cpp
source/libs/sync/test/syncHashCacheTest.cpp
+0
-8
source/libs/sync/test/syncHeartbeatReplyTest.cpp
source/libs/sync/test/syncHeartbeatReplyTest.cpp
+1
-5
source/libs/sync/test/syncHeartbeatTest.cpp
source/libs/sync/test/syncHeartbeatTest.cpp
+1
-5
source/libs/sync/test/syncIOClientTest.cpp
source/libs/sync/test/syncIOClientTest.cpp
+1
-7
source/libs/sync/test/syncIOSendMsgTest.cpp
source/libs/sync/test/syncIOSendMsgTest.cpp
+2
-8
source/libs/sync/test/syncIOServerTest.cpp
source/libs/sync/test/syncIOServerTest.cpp
+1
-5
source/libs/sync/test/syncIOTickPingTest.cpp
source/libs/sync/test/syncIOTickPingTest.cpp
+1
-4
source/libs/sync/test/syncIOTickQTest.cpp
source/libs/sync/test/syncIOTickQTest.cpp
+1
-4
source/libs/sync/test/syncIndexMgrTest.cpp
source/libs/sync/test/syncIndexMgrTest.cpp
+1
-9
source/libs/sync/test/syncIndexTest.cpp
source/libs/sync/test/syncIndexTest.cpp
+1
-5
source/libs/sync/test/syncInitTest.cpp
source/libs/sync/test/syncInitTest.cpp
+1
-7
source/libs/sync/test/syncLeaderTransferTest.cpp
source/libs/sync/test/syncLeaderTransferTest.cpp
+1
-5
source/libs/sync/test/syncLocalCmdTest.cpp
source/libs/sync/test/syncLocalCmdTest.cpp
+1
-5
source/libs/sync/test/syncLogStoreCheck.cpp
source/libs/sync/test/syncLogStoreCheck.cpp
+0
-8
source/libs/sync/test/syncLogStoreCheck2.cpp
source/libs/sync/test/syncLogStoreCheck2.cpp
+0
-8
source/libs/sync/test/syncLogStoreTest.cpp
source/libs/sync/test/syncLogStoreTest.cpp
+0
-8
source/libs/sync/test/syncPingReplyTest.cpp
source/libs/sync/test/syncPingReplyTest.cpp
+1
-5
source/libs/sync/test/syncPingSelfTest.cpp
source/libs/sync/test/syncPingSelfTest.cpp
+1
-6
source/libs/sync/test/syncPingTest.cpp
source/libs/sync/test/syncPingTest.cpp
+1
-5
source/libs/sync/test/syncPingTimerTest.cpp
source/libs/sync/test/syncPingTimerTest.cpp
+1
-6
source/libs/sync/test/syncPingTimerTest2.cpp
source/libs/sync/test/syncPingTimerTest2.cpp
+1
-6
source/libs/sync/test/syncPreSnapshotReplyTest.cpp
source/libs/sync/test/syncPreSnapshotReplyTest.cpp
+1
-5
source/libs/sync/test/syncPreSnapshotTest.cpp
source/libs/sync/test/syncPreSnapshotTest.cpp
+1
-5
source/libs/sync/test/syncRaftCfgIndexTest.cpp
source/libs/sync/test/syncRaftCfgIndexTest.cpp
+1
-6
source/libs/sync/test/syncRaftCfgTest.cpp
source/libs/sync/test/syncRaftCfgTest.cpp
+1
-7
source/libs/sync/test/syncRaftIdCheck.cpp
source/libs/sync/test/syncRaftIdCheck.cpp
+1
-4
source/libs/sync/test/syncRaftLogTest.cpp
source/libs/sync/test/syncRaftLogTest.cpp
+1
-8
source/libs/sync/test/syncRaftLogTest2.cpp
source/libs/sync/test/syncRaftLogTest2.cpp
+0
-8
source/libs/sync/test/syncRaftStoreTest.cpp
source/libs/sync/test/syncRaftStoreTest.cpp
+1
-5
source/libs/sync/test/syncRefTest.cpp
source/libs/sync/test/syncRefTest.cpp
+1
-5
source/libs/sync/test/syncReplicateTest.cpp
source/libs/sync/test/syncReplicateTest.cpp
+1
-6
source/libs/sync/test/syncRequestVoteReplyTest.cpp
source/libs/sync/test/syncRequestVoteReplyTest.cpp
+1
-5
source/libs/sync/test/syncRequestVoteTest.cpp
source/libs/sync/test/syncRequestVoteTest.cpp
+1
-5
source/libs/sync/test/syncRestoreFromSnapshot.cpp
source/libs/sync/test/syncRestoreFromSnapshot.cpp
+1
-8
source/libs/sync/test/syncRpcMsgTest.cpp
source/libs/sync/test/syncRpcMsgTest.cpp
+1
-5
source/libs/sync/test/syncSnapshotReceiverTest.cpp
source/libs/sync/test/syncSnapshotReceiverTest.cpp
+1
-7
source/libs/sync/test/syncSnapshotRspTest.cpp
source/libs/sync/test/syncSnapshotRspTest.cpp
+1
-5
source/libs/sync/test/syncSnapshotSendTest.cpp
source/libs/sync/test/syncSnapshotSendTest.cpp
+1
-5
source/libs/sync/test/syncSnapshotSenderTest.cpp
source/libs/sync/test/syncSnapshotSenderTest.cpp
+1
-7
source/libs/sync/test/syncSnapshotTest.cpp
source/libs/sync/test/syncSnapshotTest.cpp
+1
-10
source/libs/sync/test/syncTest.cpp
source/libs/sync/test/syncTest.cpp
+1
-3
source/libs/sync/test/syncTestTool.cpp
source/libs/sync/test/syncTestTool.cpp
+1
-8
source/libs/sync/test/syncTimeoutTest.cpp
source/libs/sync/test/syncTimeoutTest.cpp
+1
-5
source/libs/sync/test/syncUtilTest.cpp
source/libs/sync/test/syncUtilTest.cpp
+1
-6
source/libs/sync/test/syncVotesGrantedTest.cpp
source/libs/sync/test/syncVotesGrantedTest.cpp
+0
-8
source/libs/sync/test/syncVotesRespondTest.cpp
source/libs/sync/test/syncVotesRespondTest.cpp
+0
-8
source/libs/sync/test/syncWriteTest.cpp
source/libs/sync/test/syncWriteTest.cpp
+0
-10
source/libs/sync/test/sync_test_lib/inc/syncTest.h
source/libs/sync/test/sync_test_lib/inc/syncTest.h
+4
-0
未找到文件。
source/libs/sync/src/syncVoteMgr.c
浏览文件 @
fba45da2
...
...
@@ -62,7 +62,7 @@ bool voteGrantedMajority(SVotesGranted *pVotesGranted) { return pVotesGranted->v
void
voteGrantedVote
(
SVotesGranted
*
pVotesGranted
,
SyncRequestVoteReply
*
pMsg
)
{
if
(
!
pMsg
->
voteGranted
)
{
sNFatal
(
pVotesGranted
->
pSyncNode
,
"
vote granted should be true"
);
sNFatal
(
pVotesGranted
->
pSyncNode
,
"vote granted should be true"
);
return
;
}
...
...
@@ -73,7 +73,7 @@ void voteGrantedVote(SVotesGranted *pVotesGranted, SyncRequestVoteReply *pMsg) {
}
if
(
!
syncUtilSameId
(
&
pVotesGranted
->
pSyncNode
->
myRaftId
,
&
pMsg
->
destId
))
{
sNFatal
(
pVotesGranted
->
pSyncNode
,
"
vote granted raftId not matched with msg"
);
sNFatal
(
pVotesGranted
->
pSyncNode
,
"vote granted raftId not matched with msg"
);
return
;
}
...
...
@@ -84,8 +84,8 @@ void voteGrantedVote(SVotesGranted *pVotesGranted, SyncRequestVoteReply *pMsg) {
break
;
}
}
if
((
j
==
-
1
)
||
(
j
>=
0
&&
j
<
pVotesGranted
->
replicaNum
))
{
sNFatal
(
pVotesGranted
->
pSyncNode
,
"
invalid msg srcId, index:%d"
,
j
);
if
((
j
==
-
1
)
||
!
(
j
>=
0
&&
j
<
pVotesGranted
->
replicaNum
))
{
sNFatal
(
pVotesGranted
->
pSyncNode
,
"invalid msg srcId, index:%d"
,
j
);
return
;
}
...
...
@@ -94,8 +94,8 @@ void voteGrantedVote(SVotesGranted *pVotesGranted, SyncRequestVoteReply *pMsg) {
pVotesGranted
->
isGranted
[
j
]
=
true
;
}
if
(
pVotesGranted
->
votes
<=
pVotesGranted
->
replicaNum
)
{
sNFatal
(
pVotesGranted
->
pSyncNode
,
"
votes:%d not matched with replicaNum:%d"
,
pVotesGranted
->
votes
,
if
(
pVotesGranted
->
votes
>
pVotesGranted
->
replicaNum
)
{
sNFatal
(
pVotesGranted
->
pSyncNode
,
"votes:%d not matched with replicaNum:%d"
,
pVotesGranted
->
votes
,
pVotesGranted
->
replicaNum
);
return
;
}
...
...
source/libs/sync/test/syncAppendEntriesBatchTest.cpp
浏览文件 @
fba45da2
//#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncRaftEntry.h"
#include "syncUtil.h"
#include "trpc.h"
#include "syncTest.h"
void
logTest
()
{
...
...
source/libs/sync/test/syncAppendEntriesReplyTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncAppendEntriesTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncApplyMsgTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncConfigChangeSnapshotTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "os.h"
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncUtil.h"
#include "wal.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncConfigChangeTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "os.h"
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncUtil.h"
#include "wal.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncElectTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncUtil.h"
#include "wal.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncEncodeTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncRaftEntry.h"
#include "syncRaftLog.h"
#include "syncRaftStore.h"
#include "syncTest.h"
#include "syncUtil.h"
#include "wal.h"
#if 0
void logTest() {
...
...
source/libs/sync/test/syncEnqTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftStore.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncEntryCacheTest.cpp
浏览文件 @
fba45da2
#include <stdio.h>
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftLog.h"
#include "syncRaftStore.h"
#include "syncUtil.h"
#include "tref.h"
#include "tskiplist.h"
#include "syncTest.h"
void
logTest
()
{
...
...
source/libs/sync/test/syncEntryTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftLog.h"
#include "syncRaftStore.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
...
...
source/libs/sync/test/syncEnvTest.cpp
浏览文件 @
fba45da2
#include "syncEnv.h"
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftStore.h"
#include "ttime.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncHashCacheTest.cpp
浏览文件 @
fba45da2
#include <stdio.h>
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftLog.h"
#include "syncRaftStore.h"
#include "syncTest.h"
#include "syncUtil.h"
#include "tskiplist.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncHeartbeatReplyTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncHeartbeatTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncIOClientTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncUtil.h"
#include "tdatablock.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncIOSendMsgTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftStore.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
@@ -101,7 +95,7 @@ int main(int argc, char** argv) {
syncPingReply2RpcMsg
(
pSyncMsg
,
&
rpcMsg
);
SEpSet
epSet
;
syncUtil
n
odeInfo2EpSet
(
&
pSyncNode
->
myNodeInfo
,
&
epSet
);
syncUtil
N
odeInfo2EpSet
(
&
pSyncNode
->
myNodeInfo
,
&
epSet
);
rpcMsg
.
info
.
noResp
=
1
;
pSyncNode
->
syncSendMSg
(
&
epSet
,
&
rpcMsg
);
...
...
source/libs/sync/test/syncIOServerTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftStore.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncIOTickPingTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftStore.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncIOTickQTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftStore.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncIndexMgrTest.cpp
浏览文件 @
fba45da2
#include "syncIndexMgr.h"
//#include <gtest/gtest.h>
#include <stdio.h>
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftStore.h"
#include "syncUtil.h"
#include "syncVoteMgr.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncIndexTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftStore.h"
#include "syncTest.h"
void
print
(
SHashObj
*
pNextIndex
)
{
printf
(
"----------------
\n
"
);
...
...
source/libs/sync/test/syncInitTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftStore.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncLeaderTransferTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncLocalCmdTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncLogStoreCheck.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftLog.h"
#include "syncRaftStore.h"
#include "syncTest.h"
#include "syncUtil.h"
#include "wal.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncLogStoreCheck2.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftLog.h"
#include "syncRaftStore.h"
#include "syncUtil.h"
#include "wal.h"
#include "syncTest.h"
void
logTest
()
{
...
...
source/libs/sync/test/syncLogStoreTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftLog.h"
#include "syncRaftStore.h"
#include "syncTest.h"
#include "syncUtil.h"
#include "wal.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncPingReplyTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncPingSelfTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftStore.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncPingTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncPingTimerTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftStore.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncPingTimerTest2.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftStore.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncPreSnapshotReplyTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncPreSnapshotTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncRaftCfgIndexTest.cpp
浏览文件 @
fba45da2
#include "syncRaftStore.h"
//#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftCfg.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncRaftCfgTest.cpp
浏览文件 @
fba45da2
#include "syncRaftStore.h"
//#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftCfg.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncRaftIdCheck.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncUtil.h"
#include "syncTest.h"
void
usage
(
char
*
exe
)
{
printf
(
"Usage: %s host port
\n
"
,
exe
);
...
...
source/libs/sync/test/syncRaftLogTest.cpp
浏览文件 @
fba45da2
#include "syncRaftLog.h"
//#include <gtest/gtest.h>
#include <stdio.h>
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftStore.h"
#include "syncUtil.h"
#include "wal.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncRaftLogTest2.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftLog.h"
#include "syncRaftStore.h"
#include "syncTest.h"
#include "syncUtil.h"
#include "wal.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncRaftStoreTest.cpp
浏览文件 @
fba45da2
#include "syncRaftStore.h"
//#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncRefTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftStore.h"
#include "tref.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncReplicateTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncUtil.h"
#include "wal.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncRequestVoteReplyTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncRequestVoteTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncRestoreFromSnapshot.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftLog.h"
#include "syncRaftStore.h"
#include "syncUtil.h"
#include "wal.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncRpcMsgTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncSnapshotReceiverTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncRaftStore.h"
#include "syncSnapshot.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncSnapshotRspTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncSnapshotSendTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncSnapshotSenderTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncRaftStore.h"
#include "syncSnapshot.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncSnapshotTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncRaftEntry.h"
#include "syncRaftLog.h"
#include "syncRaftStore.h"
#include "syncUtil.h"
#include "wal.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncTest.h"
/*
typedef enum {
...
...
source/libs/sync/test/syncTestTool.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "os.h"
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftCfg.h"
#include "syncUtil.h"
#include "wal.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncTimeoutTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncUtil.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncUtilTest.cpp
浏览文件 @
fba45da2
#include "syncUtil.h"
//#include <gtest/gtest.h>
#include <stdio.h>
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftStore.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/syncVotesGrantedTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftStore.h"
#include "syncUtil.h"
#include "syncVoteMgr.h"
#include "syncTest.h"
void
logTest
()
{
...
...
source/libs/sync/test/syncVotesRespondTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncRaftStore.h"
#include "syncUtil.h"
#include "syncVoteMgr.h"
#include "syncTest.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
sDebug
(
"--- sync log test: debug"
);
...
...
source/libs/sync/test/syncWriteTest.cpp
浏览文件 @
fba45da2
#include <gtest/gtest.h>
#include <stdio.h>
#include "syncEnv.h"
#include "syncIO.h"
#include "syncInt.h"
#include "syncMessage.h"
#include "syncRaftEntry.h"
#include "syncRaftLog.h"
#include "syncRaftStore.h"
#include "syncTest.h"
#include "syncUtil.h"
#include "wal.h"
void
logTest
()
{
sTrace
(
"--- sync log test: trace"
);
...
...
source/libs/sync/test/sync_test_lib/inc/syncTest.h
浏览文件 @
fba45da2
...
...
@@ -22,8 +22,10 @@ extern "C" {
#include "syncInt.h"
#include "tref.h"
#include "wal.h"
#include "tref.h"
#include "syncEnv.h"
#include "syncIO.h"
#include "syncIndexMgr.h"
...
...
@@ -38,6 +40,8 @@ extern "C" {
#include "syncUtil.h"
#include "syncVoteMgr.h"
extern
void
addEpIntoEpSet
(
SEpSet
*
pEpSet
,
const
char
*
fqdn
,
uint16_t
port
);
cJSON
*
syncEntry2Json
(
const
SSyncRaftEntry
*
pEntry
);
char
*
syncEntry2Str
(
const
SSyncRaftEntry
*
pEntry
);
void
syncEntryPrint
(
const
SSyncRaftEntry
*
pObj
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录