Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: delete unused images from images dir #2083

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed images/fedb_arch.png
Binary file not shown.
Binary file removed images/fedb_black.png
Binary file not shown.
Binary file removed images/openmldb_architecture.jpg
Binary file not shown.
Binary file removed images/openmldb_architecture.png
Binary file not shown.
8 changes: 4 additions & 4 deletions src/zk/dist_lock_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ void OnLockedCallback() { call_invoked = true; }
void OnLostCallback() {}

TEST_F(DistLockTest, Lock) {
ZkClient client("127.0.0.1:6181", "", 10000, "127.0.0.1:9527", "/rtidb_lock");
ZkClient client("127.0.0.1:6181", "", 10000, "127.0.0.1:9527", "/openmldb_lock");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @KikiDotPy , please revert zk/dist_lock_test.cc and zk/zk_client_test.cc. This task has been done in #2086

bool ok = client.Init();
ASSERT_TRUE(ok);
DistLock lock("/rtidb_lock/nameserver_lock", &client, boost::bind(&OnLockedCallback), boost::bind(&OnLostCallback),
DistLock lock("/openmldb_lock/nameserver_lock", &client, boost::bind(&OnLockedCallback), boost::bind(&OnLostCallback),
"endpoint1");
lock.Lock();
sleep(5);
Expand All @@ -59,13 +59,13 @@ TEST_F(DistLockTest, Lock) {
lock.CurrentLockValue(current_lock);
ASSERT_EQ("endpoint1", current_lock);
call_invoked = false;
ZkClient client2("127.0.0.1:6181", "", 10000, "127.0.0.1:9527", "/rtidb_lock");
ZkClient client2("127.0.0.1:6181", "", 10000, "127.0.0.1:9527", "/openmldb_lock");
ok = client2.Init();
if (!ok) {
lock.Stop();
ASSERT_TRUE(false);
}
DistLock lock2("/rtidb_lock/nameserver_lock", &client2, boost::bind(&OnLockedCallback),
DistLock lock2("/openmldb_lock/nameserver_lock", &client2, boost::bind(&OnLockedCallback),
boost::bind(&OnLostCallback), "endpoint2");
lock2.Lock();
sleep(5);
Expand Down
22 changes: 11 additions & 11 deletions src/zk/zk_client_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ void WatchCallback(const std::vector<std::string>& endpoints) {
}

TEST_F(ZkClientTest, BadZk) {
ZkClient client("127.0.0.1:13181", "", session_timeout, "127.0.0.1:9527", "/rtidb");
ZkClient client("127.0.0.1:13181", "", session_timeout, "127.0.0.1:9527", "/openmldb");
bool ok = client.Init();
ASSERT_FALSE(ok);
}

TEST_F(ZkClientTest, Init) {
ZkClient client("127.0.0.1:6181", "", session_timeout, "127.0.0.1:9527", "/rtidb");
ZkClient client("127.0.0.1:6181", "", session_timeout, "127.0.0.1:9527", "/openmldb");
bool ok = client.Init();
ASSERT_TRUE(ok);
ok = client.Register();
Expand All @@ -71,7 +71,7 @@ TEST_F(ZkClientTest, Init) {
ok = client.WatchNodes();
ASSERT_TRUE(ok);
{
ZkClient client2("127.0.0.1:6181", "", session_timeout, "127.0.0.1:9528", "/rtidb");
ZkClient client2("127.0.0.1:6181", "", session_timeout, "127.0.0.1:9528", "/openmldb");
ok = client2.Init();
client2.Register();
ASSERT_TRUE(ok);
Expand All @@ -83,45 +83,45 @@ TEST_F(ZkClientTest, Init) {
}

TEST_F(ZkClientTest, CreateNode) {
ZkClient client("127.0.0.1:6181", "", 1000, "127.0.0.1:9527", "/rtidb1");
ZkClient client("127.0.0.1:6181", "", 1000, "127.0.0.1:9527", "/openmldb1");
bool ok = client.Init();
ASSERT_TRUE(ok);

std::string assigned_path;
ok = client.CreateNode("/rtidb1/lock/request", "", ZOO_EPHEMERAL | ZOO_SEQUENCE, assigned_path);
ok = client.CreateNode("/openmldb1/lock/request", "", ZOO_EPHEMERAL | ZOO_SEQUENCE, assigned_path);
ASSERT_TRUE(ok);

std::string node = "/rtidb1/test/node" + GenRand();
std::string node = "/openmldb1/test/node" + GenRand();
int ret = client.IsExistNode(node);
ASSERT_EQ(ret, 1);
ok = client.CreateNode(node, "value");
ASSERT_TRUE(ok);
ret = client.IsExistNode(node);
ASSERT_EQ(ret, 0);

ZkClient client2("127.0.0.1:6181", "", session_timeout, "127.0.0.1:9527", "/rtidb1");
ZkClient client2("127.0.0.1:6181", "", session_timeout, "127.0.0.1:9527", "/openmldb1");
ok = client2.Init();
ASSERT_TRUE(ok);

std::string assigned_path1;
ok = client2.CreateNode("/rtidb1/lock/request", "", ZOO_EPHEMERAL | ZOO_SEQUENCE, assigned_path1);
ok = client2.CreateNode("/openmldb1/lock/request", "", ZOO_EPHEMERAL | ZOO_SEQUENCE, assigned_path1);
ASSERT_TRUE(ok);
}

TEST_F(ZkClientTest, ZkNodeChange) {
ZkClient client("127.0.0.1:6181", "", session_timeout, "127.0.0.1:9527", "/rtidb1");
ZkClient client("127.0.0.1:6181", "", session_timeout, "127.0.0.1:9527", "/openmldb1");
bool ok = client.Init();
ASSERT_TRUE(ok);

std::string node = "/rtidb1/test/node" + GenRand();
std::string node = "/openmldb1/test/node" + GenRand();
int ret = client.IsExistNode(node);
ASSERT_EQ(ret, 1);
ok = client.CreateNode(node, "1");
ASSERT_TRUE(ok);
ret = client.IsExistNode(node);
ASSERT_EQ(ret, 0);

ZkClient client2("127.0.0.1:6181", "", session_timeout, "127.0.0.1:9527", "/rtidb1");
ZkClient client2("127.0.0.1:6181", "", session_timeout, "127.0.0.1:9527", "/openmldb1");
ok = client2.Init();
ASSERT_TRUE(ok);
std::atomic<bool> detect(false);
Expand Down