Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jievince committed Nov 25, 2021
1 parent b35f374 commit 9856ab5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ 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
2 changes: 1 addition & 1 deletion 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 "server"
#define kServerHost "127.0.0.1"

class MetaClientTest : public ClientTest {
protected:
Expand Down
2 changes: 2 additions & 0 deletions src/sclient/StorageClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ StorageClient::~StorageClient() = default;
std::vector<PartitionID> StorageClient::getParts(const std::string& spaceName) {
auto spaceIdResult = mClient_->getSpaceIdByNameFromCache(spaceName);
if (!spaceIdResult.first) {
LOG(ERROR) << "Get space id from cache for space name " << spaceName << " failed";
return {};
}
int32_t spaceId = spaceIdResult.second;
auto ret = mClient_->getPartsFromCache(spaceId);
if (!ret.first) {
LOG(ERROR) << "Get parts from cache for space id " << spaceId << " failed";
return {};
}
return ret.second;
Expand Down
4 changes: 3 additions & 1 deletion 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 "server"
#define kServerHost "127.0.0.1"

class StorageClientTest : public ClientTest {
protected:
Expand All @@ -44,6 +44,8 @@ class StorageClientTest : public ClientTest {
"'103'->'201':(43), '201'->'202':(56), '202'->'203':(-13), '203'->'301':(431), "
"'301'->'302':(457)");
ASSERT_EQ(result3.errorCode, nebula::ErrorCode::SUCCEEDED);

::sleep(10);
}

static void runGetParts(nebula::StorageClient &c) {
Expand Down

0 comments on commit 9856ab5

Please sign in to comment.