提交 694ec1ce 编写于 作者: fengqikai1414's avatar fengqikai1414 提交者: gongtou

cyber: fix timer test random failuer (#8449)

* cyber: fix timer test random fail

* cyber: fix code style
上级 355debc5
......@@ -17,7 +17,6 @@
#define CYBER_CLASS_LOADER_CLASS_LOADER_H_
#include <algorithm>
#include <functional>
#include <memory>
#include <mutex>
#include <string>
......
......@@ -17,7 +17,6 @@
#ifndef CYBER_CLASS_LOADER_CLASS_LOADER_MANAGER_H_
#define CYBER_CLASS_LOADER_CLASS_LOADER_MANAGER_H_
#include <functional>
#include <map>
#include <memory>
#include <mutex>
......
......@@ -14,8 +14,8 @@
* limitations under the License.
*****************************************************************************/
#ifndef CYBER_CLASS_LOADER_CLASS_LOADER_UTILITY_H_
#define CYBER_CLASS_LOADER_CLASS_LOADER_UTILITY_H_
#ifndef CYBER_CLASS_LOADER_UTILITY_CLASS_LOADER_UTILITY_H_
#define CYBER_CLASS_LOADER_UTILITY_CLASS_LOADER_UTILITY_H_
#include <Poco/SharedLibrary.h>
#include <cassert>
......@@ -127,8 +127,9 @@ std::vector<std::string> GetValidClassNames(ClassLoader* loader) {
return classes;
}
} // End namespace utility
} // End namespace class_loader
} // namespace utility
} // namespace class_loader
} // namespace cyber
} // namespace apollo
#endif // CYBER_CLASS_LOADER_CLASS_LOADER_UTILITY_H_
#endif // CYBER_CLASS_LOADER_UTILITY_CLASS_LOADER_UTILITY_H_
......@@ -41,7 +41,7 @@ TEST(TimerTest, one_shot) {
timer.Start();
std::this_thread::sleep_for(std::chrono::milliseconds(90));
EXPECT_EQ(0, count);
std::this_thread::sleep_for(std::chrono::milliseconds(100));
std::this_thread::sleep_for(std::chrono::milliseconds(200));
EXPECT_EQ(100, count);
timer.Stop();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册