diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 2d316a21..191ad944 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -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 diff --git a/src/mclient/tests/MetaClientTest.cpp b/src/mclient/tests/MetaClientTest.cpp index 74458856..0e0d4bfa 100644 --- a/src/mclient/tests/MetaClientTest.cpp +++ b/src/mclient/tests/MetaClientTest.cpp @@ -19,7 +19,7 @@ // Require a nebula server could access -#define kServerHost "server" +#define kServerHost "127.0.0.1" class MetaClientTest : public ClientTest { protected: diff --git a/src/sclient/StorageClient.cpp b/src/sclient/StorageClient.cpp index 8d3e7838..5b573079 100644 --- a/src/sclient/StorageClient.cpp +++ b/src/sclient/StorageClient.cpp @@ -26,11 +26,13 @@ StorageClient::~StorageClient() = default; std::vector 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; diff --git a/src/sclient/tests/StorageClientTest.cpp b/src/sclient/tests/StorageClientTest.cpp index 5e3d008c..8562b13d 100644 --- a/src/sclient/tests/StorageClientTest.cpp +++ b/src/sclient/tests/StorageClientTest.cpp @@ -19,7 +19,7 @@ // Require a nebula server could access -#define kServerHost "server" +#define kServerHost "127.0.0.1" class StorageClientTest : public ClientTest { protected: @@ -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) {