diff --git a/test/unittest/dump_catcher/dumpcatcher_interfaces_test.cpp b/test/unittest/dump_catcher/dumpcatcher_interfaces_test.cpp index 311a21a7ca6eb701c4774c217a3eb48934c2d6dc..8422dbebdc8ea13876d804d4f1ac801e67cc7c23 100644 --- a/test/unittest/dump_catcher/dumpcatcher_interfaces_test.cpp +++ b/test/unittest/dump_catcher/dumpcatcher_interfaces_test.cpp @@ -1173,7 +1173,7 @@ HWTEST_F(DumpCatcherInterfacesTest, DumpCatcherInterfacesTest043, TestSize.Level int now = static_cast(GetAbsTimeMilliSeconds()); int timeWait = hungUpProcessdumpTime - (now - timeStart - waitForkPidStartTime); timeWait = timeWait > 0 ? timeWait : 0; - std::this_thread::sleep_for(std::chrono::milliseconds(hungUpProcessdumpTime)); + std::this_thread::sleep_for(std::chrono::milliseconds(timeWait)); kill(processdumpPid, SIGCONT); } break;