diff --git a/core/unittest/pipeline/PipelineUpdateUnittest.cpp b/core/unittest/pipeline/PipelineUpdateUnittest.cpp index 71d1dfa2b3..65e7985003 100644 --- a/core/unittest/pipeline/PipelineUpdateUnittest.cpp +++ b/core/unittest/pipeline/PipelineUpdateUnittest.cpp @@ -269,7 +269,7 @@ class PipelineUpdateUnittest : public testing::Test { APSARA_TEST_EQUAL_FATAL(to + 1, i); return; } - this_thread::sleep_for(chrono::milliseconds(1000)); + this_thread::sleep_for(chrono::milliseconds(2000)); } } @@ -441,7 +441,7 @@ void PipelineUpdateUnittest::TestPipelineParamUpdateCase1() const { pipelineConfigObjUpdate.Parse(); diffUpdate.mModified.push_back(std::move(pipelineConfigObjUpdate)); auto result = async(launch::async, [&]() { - this_thread::sleep_for(chrono::milliseconds(1000)); + this_thread::sleep_for(chrono::milliseconds(2000)); processor->Unblock(); }); pipelineManager->UpdatePipelines(diffUpdate); @@ -568,7 +568,7 @@ void PipelineUpdateUnittest::TestPipelineParamUpdateCase4() const { pipelineConfigObjUpdate.Parse(); diffUpdate.mModified.push_back(std::move(pipelineConfigObjUpdate)); auto result = async(launch::async, [&]() { - this_thread::sleep_for(chrono::milliseconds(1000)); + this_thread::sleep_for(chrono::milliseconds(2000)); LogtailPluginMock::GetInstance()->UnblockProcess(); }); pipelineManager->UpdatePipelines(diffUpdate); @@ -625,7 +625,7 @@ void PipelineUpdateUnittest::TestPipelineTypeUpdateCase1() const { pipelineConfigObjUpdate.Parse(); diffUpdate.mModified.push_back(std::move(pipelineConfigObjUpdate)); auto result = async(launch::async, [&]() { - this_thread::sleep_for(chrono::milliseconds(1000)); + this_thread::sleep_for(chrono::milliseconds(2000)); processor->Unblock(); }); pipelineManager->UpdatePipelines(diffUpdate); @@ -752,7 +752,7 @@ void PipelineUpdateUnittest::TestPipelineTypeUpdateCase4() const { pipelineConfigObjUpdate.Parse(); diffUpdate.mModified.push_back(std::move(pipelineConfigObjUpdate)); auto result = async(launch::async, [&]() { - this_thread::sleep_for(chrono::milliseconds(1000)); + this_thread::sleep_for(chrono::milliseconds(2000)); LogtailPluginMock::GetInstance()->UnblockProcess(); }); pipelineManager->UpdatePipelines(diffUpdate); @@ -809,7 +809,7 @@ void PipelineUpdateUnittest::TestPipelineTopoUpdateCase1() const { pipelineConfigObjUpdate.Parse(); diffUpdate.mModified.push_back(std::move(pipelineConfigObjUpdate)); auto result = async(launch::async, [&]() { - this_thread::sleep_for(chrono::milliseconds(1000)); + this_thread::sleep_for(chrono::milliseconds(2000)); processor->Unblock(); }); pipelineManager->UpdatePipelines(diffUpdate); @@ -861,7 +861,7 @@ void PipelineUpdateUnittest::TestPipelineTopoUpdateCase2() const { pipelineConfigObjUpdate.Parse(); diffUpdate.mModified.push_back(std::move(pipelineConfigObjUpdate)); auto result = async(launch::async, [&]() { - this_thread::sleep_for(chrono::milliseconds(1000)); + this_thread::sleep_for(chrono::milliseconds(2000)); processor->Unblock(); }); pipelineManager->UpdatePipelines(diffUpdate); @@ -920,7 +920,7 @@ void PipelineUpdateUnittest::TestPipelineTopoUpdateCase3() const { pipelineConfigObjUpdate.Parse(); diffUpdate.mModified.push_back(std::move(pipelineConfigObjUpdate)); auto result = async(launch::async, [&]() { - this_thread::sleep_for(chrono::milliseconds(1000)); + this_thread::sleep_for(chrono::milliseconds(2000)); processor->Unblock(); }); pipelineManager->UpdatePipelines(diffUpdate); @@ -1211,7 +1211,7 @@ void PipelineUpdateUnittest::TestPipelineTopoUpdateCase10() const { pipelineConfigObjUpdate.Parse(); diffUpdate.mModified.push_back(std::move(pipelineConfigObjUpdate)); auto result = async(launch::async, [&]() { - this_thread::sleep_for(chrono::milliseconds(1000)); + this_thread::sleep_for(chrono::milliseconds(2000)); LogtailPluginMock::GetInstance()->UnblockProcess(); }); pipelineManager->UpdatePipelines(diffUpdate); @@ -1269,7 +1269,7 @@ void PipelineUpdateUnittest::TestPipelineTopoUpdateCase11() const { pipelineConfigObjUpdate.Parse(); diffUpdate.mModified.push_back(std::move(pipelineConfigObjUpdate)); auto result = async(launch::async, [&]() { - this_thread::sleep_for(chrono::milliseconds(1000)); + this_thread::sleep_for(chrono::milliseconds(2000)); LogtailPluginMock::GetInstance()->UnblockProcess(); }); pipelineManager->UpdatePipelines(diffUpdate); @@ -1320,7 +1320,7 @@ void PipelineUpdateUnittest::TestPipelineTopoUpdateCase12() const { pipelineConfigObjUpdate.Parse(); diffUpdate.mModified.push_back(std::move(pipelineConfigObjUpdate)); auto result = async(launch::async, [&]() { - this_thread::sleep_for(chrono::milliseconds(1000)); + this_thread::sleep_for(chrono::milliseconds(2000)); LogtailPluginMock::GetInstance()->UnblockProcess(); }); pipelineManager->UpdatePipelines(diffUpdate); @@ -1385,11 +1385,11 @@ void PipelineUpdateUnittest::TestPipelineInputBlock() const { pipelineManager->UpdatePipelines(diffUpdate); BlockProcessor(configName); }); - this_thread::sleep_for(chrono::milliseconds(1000)); + this_thread::sleep_for(chrono::milliseconds(2000)); APSARA_TEST_NOT_EQUAL_FATAL(future_status::ready, result1.wait_for(chrono::milliseconds(0))); input->Unblock(); auto result2 = async(launch::async, [&]() { - this_thread::sleep_for(chrono::milliseconds(1000)); + this_thread::sleep_for(chrono::milliseconds(2000)); processor->Unblock(); }); result1.get(); @@ -1438,7 +1438,7 @@ void PipelineUpdateUnittest::TestPipelineGoInputBlockCase1() const { pipelineConfigObjUpdate.Parse(); diffUpdate.mModified.push_back(std::move(pipelineConfigObjUpdate)); auto result = async(launch::async, [&]() { pipelineManager->UpdatePipelines(diffUpdate); }); - this_thread::sleep_for(chrono::milliseconds(1000)); + this_thread::sleep_for(chrono::milliseconds(2000)); APSARA_TEST_NOT_EQUAL_FATAL(future_status::ready, result.wait_for(chrono::milliseconds(0))); LogtailPluginMock::GetInstance()->UnblockStop(); result.get(); @@ -1489,7 +1489,7 @@ void PipelineUpdateUnittest::TestPipelineGoInputBlockCase2() const { pipelineConfigObjUpdate.Parse(); diffUpdate.mModified.push_back(std::move(pipelineConfigObjUpdate)); auto result = async(launch::async, [&]() { pipelineManager->UpdatePipelines(diffUpdate); }); - this_thread::sleep_for(chrono::milliseconds(1000)); + this_thread::sleep_for(chrono::milliseconds(2000)); APSARA_TEST_NOT_EQUAL_FATAL(future_status::ready, result.wait_for(chrono::milliseconds(0))); LogtailPluginMock::GetInstance()->UnblockStop(); result.get(); @@ -1681,7 +1681,7 @@ void PipelineUpdateUnittest::TestPipelineUpdateManyCase1() const { pipelineConfigObjUpdate3.Parse(); diffUpdate3.mModified.push_back(std::move(pipelineConfigObjUpdate3)); auto result = async(launch::async, [&]() { - this_thread::sleep_for(chrono::milliseconds(1000)); + this_thread::sleep_for(chrono::milliseconds(2000)); auto processor1 = static_cast(const_cast(pipeline1->mProcessorLine[0].get()->mPlugin.get())); processor1->Unblock(); @@ -1759,7 +1759,7 @@ void PipelineUpdateUnittest::TestPipelineUpdateManyCase2() const { pipelineConfigObjUpdate3.Parse(); diffUpdate3.mModified.push_back(std::move(pipelineConfigObjUpdate3)); auto result = async(launch::async, [&]() { - this_thread::sleep_for(chrono::milliseconds(1000)); + this_thread::sleep_for(chrono::milliseconds(2000)); auto processor1 = static_cast(const_cast(pipeline1->mProcessorLine[0].get()->mPlugin.get())); processor1->Unblock(); @@ -1837,7 +1837,7 @@ void PipelineUpdateUnittest::TestPipelineUpdateManyCase3() const { pipelineConfigObjUpdate3.Parse(); diffUpdate3.mModified.push_back(std::move(pipelineConfigObjUpdate3)); auto result = async(launch::async, [&]() { - this_thread::sleep_for(chrono::milliseconds(1000)); + this_thread::sleep_for(chrono::milliseconds(2000)); auto processor1 = static_cast(const_cast(pipeline1->mProcessorLine[0].get()->mPlugin.get())); processor1->Unblock(); @@ -1912,7 +1912,7 @@ void PipelineUpdateUnittest::TestPipelineUpdateManyCase4() const { pipelineConfigObjUpdate3.Parse(); diffUpdate3.mModified.push_back(std::move(pipelineConfigObjUpdate3)); auto result = async(launch::async, [&]() { - this_thread::sleep_for(chrono::milliseconds(1000)); + this_thread::sleep_for(chrono::milliseconds(2000)); auto processor1 = static_cast(const_cast(pipeline1->mProcessorLine[0].get()->mPlugin.get())); processor1->Unblock(); @@ -1988,7 +1988,7 @@ void PipelineUpdateUnittest::TestPipelineUpdateManyCase5() const { pipelineConfigObjUpdate3.Parse(); diffUpdate3.mModified.push_back(std::move(pipelineConfigObjUpdate3)); auto result = async(launch::async, [&]() { - this_thread::sleep_for(chrono::milliseconds(1000)); + this_thread::sleep_for(chrono::milliseconds(2000)); auto processor1 = static_cast(const_cast(pipeline1->mProcessorLine[0].get()->mPlugin.get())); processor1->Unblock(); @@ -2060,7 +2060,7 @@ void PipelineUpdateUnittest::TestPipelineUpdateManyCase6() const { pipelineConfigObjUpdate3.Parse(); diffUpdate3.mModified.push_back(std::move(pipelineConfigObjUpdate3)); auto result = async(launch::async, [&]() { - this_thread::sleep_for(chrono::milliseconds(1000)); + this_thread::sleep_for(chrono::milliseconds(2000)); auto processor1 = static_cast(const_cast(pipeline1->mProcessorLine[0].get()->mPlugin.get())); processor1->Unblock(); @@ -2132,7 +2132,7 @@ void PipelineUpdateUnittest::TestPipelineUpdateManyCase7() const { pipelineConfigObjUpdate3.Parse(); diffUpdate3.mModified.push_back(std::move(pipelineConfigObjUpdate3)); auto result = async(launch::async, [&]() { - this_thread::sleep_for(chrono::milliseconds(1000)); + this_thread::sleep_for(chrono::milliseconds(2000)); auto processor1 = static_cast(const_cast(pipeline1->mProcessorLine[0].get()->mPlugin.get())); processor1->Unblock(); @@ -2201,7 +2201,7 @@ void PipelineUpdateUnittest::TestPipelineUpdateManyCase8() const { pipelineConfigObjUpdate3.Parse(); diffUpdate3.mModified.push_back(std::move(pipelineConfigObjUpdate3)); auto result = async(launch::async, [&]() { - this_thread::sleep_for(chrono::milliseconds(1000)); + this_thread::sleep_for(chrono::milliseconds(2000)); auto processor1 = static_cast(const_cast(pipeline1->mProcessorLine[0].get()->mPlugin.get())); processor1->Unblock();