提交 0526051e 编写于 作者: S Shengliang Guan

minor changes

上级 821b9ea4
......@@ -7,9 +7,6 @@ add_subdirectory(db)
add_subdirectory(dnode)
# add_subdirectory(func)
add_subdirectory(mnode)
add_subdirectory(qnode)
add_subdirectory(snode)
add_subdirectory(bnode)
add_subdirectory(profile)
add_subdirectory(show)
add_subdirectory(stb)
......
enable_testing()
add_subdirectory(acct)
add_subdirectory(user)
add_subdirectory(acct)
add_subdirectory(trans)
add_subdirectory(qnode)
add_subdirectory(snode)
add_subdirectory(bnode)
......@@ -3,7 +3,7 @@
* @author slguan (slguan@taosdata.com)
* @brief MNODE module acct tests
* @version 1.0
* @date 2021-12-15
* @date 2022-01-04
*
* @copyright Copyright (c) 2022
*
......
/**
* @file dnode.cpp
* @file bnode.cpp
* @author slguan (slguan@taosdata.com)
* @brief DNODE module dnode-msg tests
* @version 0.1
* @date 2021-12-15
* @brief MNODE module bnode tests
* @version 1.0
* @date 2022-01-05
*
* @copyright Copyright (c) 2021
* @copyright Copyright (c) 2022
*
*/
......@@ -18,11 +18,11 @@ class DndTestBnode : public ::testing::Test {
public:
static void SetUpTestSuite() {
test.Init("/tmp/dnode_test_bnode1", 9068);
test.Init("/tmp/mnode_test_bnode1", 9018);
const char* fqdn = "localhost";
const char* firstEp = "localhost:9068";
const char* firstEp = "localhost:9018";
server2.Start("/tmp/dnode_test_bnode2", fqdn, 9069, firstEp);
server2.Start("/tmp/mnode_test_bnode2", fqdn, 9019, firstEp);
taosMsleep(300);
}
......@@ -72,7 +72,7 @@ TEST_F(DndTestBnode, 02_Create_Bnode_Invalid_Id) {
EXPECT_EQ(test.GetShowRows(), 1);
CheckInt16(1);
CheckBinary("localhost:9068", TSDB_EP_LEN);
CheckBinary("localhost:9018", TSDB_EP_LEN);
CheckTimestamp();
}
}
......@@ -97,7 +97,7 @@ TEST_F(DndTestBnode, 04_Create_Bnode) {
SCreateDnodeMsg* pReq = (SCreateDnodeMsg*)rpcMallocCont(contLen);
strcpy(pReq->fqdn, "localhost");
pReq->port = htonl(9069);
pReq->port = htonl(9019);
SRpcMsg* pMsg = test.SendMsg(TDMT_MND_CREATE_DNODE, pReq, contLen);
ASSERT_NE(pMsg, nullptr);
......@@ -126,8 +126,8 @@ TEST_F(DndTestBnode, 04_Create_Bnode) {
CheckInt16(1);
CheckInt16(2);
CheckBinary("localhost:9068", TSDB_EP_LEN);
CheckBinary("localhost:9069", TSDB_EP_LEN);
CheckBinary("localhost:9018", TSDB_EP_LEN);
CheckBinary("localhost:9019", TSDB_EP_LEN);
CheckTimestamp();
CheckTimestamp();
}
......@@ -148,7 +148,7 @@ TEST_F(DndTestBnode, 04_Create_Bnode) {
EXPECT_EQ(test.GetShowRows(), 1);
CheckInt16(1);
CheckBinary("localhost:9068", TSDB_EP_LEN);
CheckBinary("localhost:9018", TSDB_EP_LEN);
CheckTimestamp();
}
}
\ No newline at end of file
/**
* @file dnode.cpp
* @file qnode.cpp
* @author slguan (slguan@taosdata.com)
* @brief DNODE module dnode-msg tests
* @version 0.1
* @date 2021-12-15
* @brief MNODE module qnode tests
* @version 1.0
* @date 2022-01-05
*
* @copyright Copyright (c) 2021
* @copyright Copyright (c) 2022
*
*/
......@@ -18,11 +18,11 @@ class DndTestQnode : public ::testing::Test {
public:
static void SetUpTestSuite() {
test.Init("/tmp/dnode_test_qnode1", 9064);
test.Init("/tmp/mnode_test_qnode1", 9014);
const char* fqdn = "localhost";
const char* firstEp = "localhost:9064";
const char* firstEp = "localhost:9014";
server2.Start("/tmp/dnode_test_qnode2", fqdn, 9065, firstEp);
server2.Start("/tmp/mnode_test_qnode2", fqdn, 9015, firstEp);
taosMsleep(300);
}
......@@ -72,7 +72,7 @@ TEST_F(DndTestQnode, 02_Create_Qnode_Invalid_Id) {
EXPECT_EQ(test.GetShowRows(), 1);
CheckInt16(1);
CheckBinary("localhost:9064", TSDB_EP_LEN);
CheckBinary("localhost:9014", TSDB_EP_LEN);
CheckTimestamp();
}
}
......@@ -97,7 +97,7 @@ TEST_F(DndTestQnode, 04_Create_Qnode) {
SCreateDnodeMsg* pReq = (SCreateDnodeMsg*)rpcMallocCont(contLen);
strcpy(pReq->fqdn, "localhost");
pReq->port = htonl(9065);
pReq->port = htonl(9015);
SRpcMsg* pMsg = test.SendMsg(TDMT_MND_CREATE_DNODE, pReq, contLen);
ASSERT_NE(pMsg, nullptr);
......@@ -126,8 +126,8 @@ TEST_F(DndTestQnode, 04_Create_Qnode) {
CheckInt16(1);
CheckInt16(2);
CheckBinary("localhost:9064", TSDB_EP_LEN);
CheckBinary("localhost:9065", TSDB_EP_LEN);
CheckBinary("localhost:9014", TSDB_EP_LEN);
CheckBinary("localhost:9015", TSDB_EP_LEN);
CheckTimestamp();
CheckTimestamp();
}
......@@ -148,7 +148,7 @@ TEST_F(DndTestQnode, 04_Create_Qnode) {
EXPECT_EQ(test.GetShowRows(), 1);
CheckInt16(1);
CheckBinary("localhost:9064", TSDB_EP_LEN);
CheckBinary("localhost:9014", TSDB_EP_LEN);
CheckTimestamp();
}
}
\ No newline at end of file
/**
* @file dnode.cpp
* @file snode.cpp
* @author slguan (slguan@taosdata.com)
* @brief DNODE module dnode-msg tests
* @version 0.1
* @date 2021-12-15
* @brief MNODE module snode tests
* @version 1.0
* @date 2022-01-05
*
* @copyright Copyright (c) 2021
* @copyright Copyright (c) 2022
*
*/
......@@ -18,11 +18,11 @@ class DndTestSnode : public ::testing::Test {
public:
static void SetUpTestSuite() {
test.Init("/tmp/dnode_test_snode1", 9066);
test.Init("/tmp/mnode_test_snode1", 9016);
const char* fqdn = "localhost";
const char* firstEp = "localhost:9066";
const char* firstEp = "localhost:9016";
server2.Start("/tmp/dnode_test_snode2", fqdn, 9067, firstEp);
server2.Start("/tmp/mnode_test_snode2", fqdn, 9017, firstEp);
taosMsleep(300);
}
......@@ -72,7 +72,7 @@ TEST_F(DndTestSnode, 02_Create_Snode_Invalid_Id) {
EXPECT_EQ(test.GetShowRows(), 1);
CheckInt16(1);
CheckBinary("localhost:9066", TSDB_EP_LEN);
CheckBinary("localhost:9016", TSDB_EP_LEN);
CheckTimestamp();
}
}
......@@ -97,7 +97,7 @@ TEST_F(DndTestSnode, 04_Create_Snode) {
SCreateDnodeMsg* pReq = (SCreateDnodeMsg*)rpcMallocCont(contLen);
strcpy(pReq->fqdn, "localhost");
pReq->port = htonl(9067);
pReq->port = htonl(9017);
SRpcMsg* pMsg = test.SendMsg(TDMT_MND_CREATE_DNODE, pReq, contLen);
ASSERT_NE(pMsg, nullptr);
......@@ -126,8 +126,8 @@ TEST_F(DndTestSnode, 04_Create_Snode) {
CheckInt16(1);
CheckInt16(2);
CheckBinary("localhost:9066", TSDB_EP_LEN);
CheckBinary("localhost:9067", TSDB_EP_LEN);
CheckBinary("localhost:9016", TSDB_EP_LEN);
CheckBinary("localhost:9017", TSDB_EP_LEN);
CheckTimestamp();
CheckTimestamp();
}
......@@ -148,7 +148,7 @@ TEST_F(DndTestSnode, 04_Create_Snode) {
EXPECT_EQ(test.GetShowRows(), 1);
CheckInt16(1);
CheckBinary("localhost:9066", TSDB_EP_LEN);
CheckBinary("localhost:9016", TSDB_EP_LEN);
CheckTimestamp();
}
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
* @file trans.cpp
* @author slguan (slguan@taosdata.com)
* @brief MNODE module trans tests
* @version 0.1
* @version 1.0
* @date 2022-01-04
*
* @copyright Copyright (c) 2022
......
......@@ -3,9 +3,9 @@
* @author slguan (slguan@taosdata.com)
* @brief MNODE module user tests
* @version 1.0
* @date 2021-12-15
* @date 2022-01-04
*
* @copyright Copyright (c) 2021
* @copyright Copyright (c) 2022
*
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册