Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
jievince committed Nov 22, 2021
1 parent 061be2f commit 7c243aa
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ jobs:
echo '127.0.0.1 graphd' >> /etc/hosts
echo '127.0.0.1 graphd1' >> /etc/hosts
echo '127.0.0.1 graphd2' >> /etc/hosts
echo '127.0.0.1 server' >> /etc/hosts
- name: CTest
env:
ASAN_OPTIONS: fast_unwind_on_malloc=1
Expand Down
10 changes: 9 additions & 1 deletion src/mclient/MetaClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ MetaClient::MetaClient(const std::vector<std::string>& metaAddrs) {
ioExecutor_ = std::make_shared<folly::IOThreadPoolExecutor>(std::thread::hardware_concurrency());
clientsMan_ =
std::make_shared<thrift::ThriftClientManager<meta::cpp2::MetaServiceAsyncClient>>(false);
loadData(); // load data into cache
bool b = loadData(); // load data into cache
if (!b) {
LOG(INFO) << "load data failed";
} else {
LOG(INFO) << "load data succecced";
LOG(INFO) << spaceIndexByName_.size();
LOG(INFO) << spaceEdgeIndexByName_.size();
LOG(INFO) << spacePartLeaderMap_.size();
}
}

MetaClient::~MetaClient() = default;
Expand Down
9 changes: 6 additions & 3 deletions src/mclient/tests/MetaClientTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

// Require a nebula server could access

#define kServerHost "127.0.0.1"
#define kServerHost "server"

class MetaClientTest : public ClientTest {
protected:
Expand Down Expand Up @@ -58,13 +58,16 @@ class MetaClientTest : public ClientTest {

auto ret4 = c.getPartLeaderFromCache(spaceId, 1);
ASSERT_TRUE(ret4.first);
EXPECT_EQ(ret4.second, nebula::HostAddr("127.0.0.1", 9779));
EXPECT_EQ(ret4.second, nebula::HostAddr(kServerHost, 9779));
}
};

TEST_F(MetaClientTest, Basic) {
nebula::MetaClient c({kServerHost ":9559"});
LOG(INFO) << "Prepare data.";
prepare();

LOG(INFO) << "Run once.";
nebula::MetaClient c({kServerHost ":9559"});
runOnce(c);
}

Expand Down
1 change: 1 addition & 0 deletions src/sclient/ScanEdgeIter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ DataSet ScanEdgeIter::next() {
auto partCursorMapReq = req_->get_parts();
DCHECK_EQ(partCursorMapReq.size(), 1);
partCursorMapReq.begin()->second.set_next_cursor(nextCursor_);
LOG(INFO) << "nextCursor of req: " << partCursorMapReq.begin()->second.get_next_cursor();
req_->set_parts(partCursorMapReq);
}
auto r = client_->doScanEdge(*req_);
Expand Down
5 changes: 3 additions & 2 deletions src/sclient/tests/StorageClientTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

// Require a nebula server could access

#define kServerHost "127.0.0.1"
#define kServerHost "server"

class StorageClientTest : public ClientTest {
protected:
Expand Down Expand Up @@ -107,8 +107,9 @@ class StorageClientTest : public ClientTest {
};

TEST_F(StorageClientTest, Basic) {
nebula::StorageClient c({kServerHost ":9559"});
LOG(INFO) << "Prepare data.";
prepare();
nebula::StorageClient c({kServerHost ":9559"});
LOG(INFO) << "Testing run get parts.";
runGetParts(c);
LOG(INFO) << "Testing run scan edge with part.";
Expand Down

0 comments on commit 7c243aa

Please sign in to comment.