From e37bf5162a464313ed33394a855441eb45155930 Mon Sep 17 00:00:00 2001 From: pengweisong <90180021+pengweisong@users.noreply.github.com> Date: Sun, 9 Oct 2022 10:05:20 +0800 Subject: [PATCH] enlarge the ttl sleep interval in the test --- src/storage/test/CompactionTest.cpp | 4 ++-- src/storage/test/GetDstBySrcTest.cpp | 2 +- src/storage/test/GetNeighborsTest.cpp | 2 +- src/storage/test/ScanEdgeTest.cpp | 2 +- src/storage/test/ScanVertexTest.cpp | 2 +- src/storage/test/UpdateEdgeTest.cpp | 6 +++--- src/storage/test/UpdateVertexTest.cpp | 6 +++--- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/storage/test/CompactionTest.cpp b/src/storage/test/CompactionTest.cpp index 7c4f8cf9079..6c79f0f89cb 100644 --- a/src/storage/test/CompactionTest.cpp +++ b/src/storage/test/CompactionTest.cpp @@ -212,7 +212,7 @@ TEST(CompactionFilterTest, TTLFilterDataExpiredTest) { checkEdgeData(spaceVidLen, spaceId, 102, parts, env, 18); // wait ttl data Expire - sleep(FLAGS_mock_ttl_duration + 1); + sleep(FLAGS_mock_ttl_duration + 2); LOG(INFO) << "Do compaction"; auto* ns = dynamic_cast(env->kvstore_); @@ -389,7 +389,7 @@ TEST(CompactionFilterTest, TTLFilterDataIndexExpiredTest) { checkIndexData(spaceId, 102, 6, env, 18); // wait ttl data Expire - sleep(FLAGS_mock_ttl_duration + 1); + sleep(FLAGS_mock_ttl_duration + 2); LOG(INFO) << "Do compaction"; auto* ns = dynamic_cast(env->kvstore_); diff --git a/src/storage/test/GetDstBySrcTest.cpp b/src/storage/test/GetDstBySrcTest.cpp index 68e7c079a49..e8ae0d1ca4f 100644 --- a/src/storage/test/GetDstBySrcTest.cpp +++ b/src/storage/test/GetDstBySrcTest.cpp @@ -222,7 +222,7 @@ TEST_F(GetDstBySrcTTLTest, TTLTest) { "Dwight Howard"}; verify(vertices, edges, expect); } - sleep(FLAGS_mock_ttl_duration + 1); + sleep(FLAGS_mock_ttl_duration + 2); LOG(INFO) << "Read data when data expired"; { std::vector vertices{"Tim Duncan"}; diff --git a/src/storage/test/GetNeighborsTest.cpp b/src/storage/test/GetNeighborsTest.cpp index 3a0f9826a18..1d7f821a1f3 100644 --- a/src/storage/test/GetNeighborsTest.cpp +++ b/src/storage/test/GetNeighborsTest.cpp @@ -1044,7 +1044,7 @@ TEST(GetNeighborsTest, TtlTest) { QueryTestUtils::checkResponse( *resp.vertices_ref(), vertices, over, tags, edges, 1, expectColsNum); } - sleep(FLAGS_mock_ttl_duration + 1); + sleep(FLAGS_mock_ttl_duration + 2); { LOG(INFO) << "OutEdgeReturnAllProperty"; std::vector vertices = {"Tim Duncan"}; diff --git a/src/storage/test/ScanEdgeTest.cpp b/src/storage/test/ScanEdgeTest.cpp index 012c78ff89b..9f1fdb784d4 100644 --- a/src/storage/test/ScanEdgeTest.cpp +++ b/src/storage/test/ScanEdgeTest.cpp @@ -370,7 +370,7 @@ TEST(ScanEdgeTest, TtlTest) { } CHECK_EQ(mock::MockData::serves_.size(), totalRowCount); } - sleep(FLAGS_mock_ttl_duration + 1); + sleep(FLAGS_mock_ttl_duration + 2); { LOG(INFO) << "TTL expired, same request but no data returned"; auto edge = std::make_pair( diff --git a/src/storage/test/ScanVertexTest.cpp b/src/storage/test/ScanVertexTest.cpp index 294d02fe69d..7151a219528 100644 --- a/src/storage/test/ScanVertexTest.cpp +++ b/src/storage/test/ScanVertexTest.cpp @@ -531,7 +531,7 @@ TEST(ScanVertexTest, TtlTest) { } CHECK_EQ(mock::MockData::players_.size(), totalRowCount); } - sleep(FLAGS_mock_ttl_duration + 1); + sleep(FLAGS_mock_ttl_duration + 2); { LOG(INFO) << "TTL expired, same request but no data returned"; auto tag = diff --git a/src/storage/test/UpdateEdgeTest.cpp b/src/storage/test/UpdateEdgeTest.cpp index 8ad2bb7a117..f780073ba50 100644 --- a/src/storage/test/UpdateEdgeTest.cpp +++ b/src/storage/test/UpdateEdgeTest.cpp @@ -1112,7 +1112,7 @@ TEST(UpdateEdgeTest, TTL_NoInsert_Test) { req.return_props_ref() = std::move(tmpProps); req.insertable_ref() = false; - sleep(FLAGS_mock_ttl_duration + 1); + sleep(FLAGS_mock_ttl_duration + 2); LOG(INFO) << "Test UpdateEdgeRequest..."; auto* processor = UpdateEdgeProcessor::instance(env, nullptr); @@ -1207,7 +1207,7 @@ TEST(UpdateEdgeTest, TTL_Insert_No_Exist_Test) { req.return_props_ref() = std::move(tmpProps); req.insertable_ref() = true; - sleep(FLAGS_mock_ttl_duration + 1); + sleep(FLAGS_mock_ttl_duration + 2); LOG(INFO) << "Test UpdateEdgeRequest..."; auto* processor = UpdateEdgeProcessor::instance(env, nullptr); @@ -1341,7 +1341,7 @@ TEST(UpdateEdgeTest, TTL_Insert_Test) { req.return_props_ref() = std::move(tmpProps); req.insertable_ref() = true; - sleep(FLAGS_mock_ttl_duration + 1); + sleep(FLAGS_mock_ttl_duration + 2); LOG(INFO) << "Test UpdateEdgeRequest..."; auto* processor = UpdateEdgeProcessor::instance(env, nullptr); diff --git a/src/storage/test/UpdateVertexTest.cpp b/src/storage/test/UpdateVertexTest.cpp index 0b4b73108db..91913009c2b 100644 --- a/src/storage/test/UpdateVertexTest.cpp +++ b/src/storage/test/UpdateVertexTest.cpp @@ -846,7 +846,7 @@ TEST(UpdateVertexTest, TTL_NoInsert_Test) { } req.insertable_ref() = false; - sleep(FLAGS_mock_ttl_duration + 1); + sleep(FLAGS_mock_ttl_duration + 2); LOG(INFO) << "Test UpdateVertexRequest..."; auto* processor = UpdateVertexProcessor::instance(env, nullptr); @@ -925,7 +925,7 @@ TEST(UpdateVertexTest, TTL_Insert_No_Exist_Test) { } req.insertable_ref() = true; - sleep(FLAGS_mock_ttl_duration + 1); + sleep(FLAGS_mock_ttl_duration + 2); LOG(INFO) << "Test UpdateVertexRequest..."; auto* processor = UpdateVertexProcessor::instance(env, nullptr); @@ -1044,7 +1044,7 @@ TEST(UpdateVertexTest, TTL_Insert_Test) { } req.insertable_ref() = true; - sleep(FLAGS_mock_ttl_duration + 1); + sleep(FLAGS_mock_ttl_duration + 2); LOG(INFO) << "Test UpdateVertexRequest..."; auto* processor = UpdateVertexProcessor::instance(env, nullptr);