Skip to content

Commit

Permalink
enlarge the ttl sleep interval in the test
Browse files Browse the repository at this point in the history
  • Loading branch information
pengweisong committed Oct 9, 2022
1 parent a03a361 commit e37bf51
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/storage/test/CompactionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<kvstore::NebulaStore*>(env->kvstore_);
Expand Down Expand Up @@ -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<kvstore::NebulaStore*>(env->kvstore_);
Expand Down
2 changes: 1 addition & 1 deletion src/storage/test/GetDstBySrcTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<VertexID> vertices{"Tim Duncan"};
Expand Down
2 changes: 1 addition & 1 deletion src/storage/test/GetNeighborsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<VertexID> vertices = {"Tim Duncan"};
Expand Down
2 changes: 1 addition & 1 deletion src/storage/test/ScanEdgeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/storage/test/ScanVertexTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
6 changes: 3 additions & 3 deletions src/storage/test/UpdateEdgeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src/storage/test/UpdateVertexTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit e37bf51

Please sign in to comment.