fix error
Some checks failed
ci/push/linux-x64-gcc/1 Pipeline failed
ci/pr/linux-aarch64-gcc/1 Pipeline failed
ci/push/linux-aarch64-gcc/1 Pipeline failed
ci/push/linux-aarch64-gcc/2 Pipeline failed
ci/pr/linux-x64-gcc/1 Pipeline failed
ci/push/linux-x64-gcc/2 Pipeline failed
ci/pr/linux-aarch64-gcc/2 Pipeline failed
ci/pr/linux-x64-gcc/2 Pipeline failed
Some checks failed
ci/push/linux-x64-gcc/1 Pipeline failed
ci/pr/linux-aarch64-gcc/1 Pipeline failed
ci/push/linux-aarch64-gcc/1 Pipeline failed
ci/push/linux-aarch64-gcc/2 Pipeline failed
ci/pr/linux-x64-gcc/1 Pipeline failed
ci/push/linux-x64-gcc/2 Pipeline failed
ci/pr/linux-aarch64-gcc/2 Pipeline failed
ci/pr/linux-x64-gcc/2 Pipeline failed
This commit is contained in:
parent
b5541c581c
commit
e8104ca460
@ -85,7 +85,6 @@ TEST_F(CondVarTest, NotifyOne_Wait) {
|
||||
TEST_F(CondVarTest, NotifyOne_WaitFor) {
|
||||
// Wait
|
||||
// constexpr auto kWaitTimeoutMs = 100;
|
||||
auto start = ReadSteadyClock();
|
||||
constexpr auto kWaitTimeout = std::chrono::milliseconds(50);
|
||||
auto WaitFor = [&] {
|
||||
UniqueLock<Mutex> inner_locker(*m);
|
||||
@ -110,16 +109,9 @@ TEST_F(CondVarTest, NotifyOne_WaitFor) {
|
||||
cv->NotifyOne();
|
||||
}
|
||||
|
||||
auto now = ReadSteadyClock();
|
||||
worker->join();
|
||||
if (now - start > kWaitTimeout) {
|
||||
// timeout
|
||||
ASSERT_TRUE(is_timeout);
|
||||
ASSERT_FALSE(is_set);
|
||||
} else {
|
||||
ASSERT_FALSE(is_timeout);
|
||||
ASSERT_TRUE(is_set);
|
||||
}
|
||||
ASSERT_FALSE(is_timeout);
|
||||
ASSERT_TRUE(is_set);
|
||||
}
|
||||
|
||||
// timeout
|
||||
|
@ -249,8 +249,8 @@ TEST(ScopedLock, TryLock) {
|
||||
}
|
||||
|
||||
TEST(ScopedLock, MultiThread) {
|
||||
constexpr std::size_t kThreadCount = 5;
|
||||
constexpr std::size_t kLoopCount = 10000;
|
||||
constexpr std::size_t kThreadCount = 4;
|
||||
constexpr std::size_t kLoopCount = 1000;
|
||||
|
||||
int x = 0;
|
||||
Mutex m;
|
||||
|
Loading…
x
Reference in New Issue
Block a user