MCPcopy Create free account
hub / github.com/apache/brpc / TEST_F

Function TEST_F

test/condition_variable_unittest.cc:148–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146//------------------------------------------------------------------------------
147
148TEST_F(ConditionVariableTest, StartupShutdownTest) {
149 Lock lock;
150
151 // First try trivial startup/shutdown.
152 {
153 ConditionVariable cv1(&lock);
154 } // Call for cv1 destruction.
155
156 // Exercise with at least a few waits.
157 ConditionVariable cv(&lock);
158
159 lock.Acquire();
160 cv.TimedWait(kTenMs); // Wait for 10 ms.
161 cv.TimedWait(kTenMs); // Wait for 10 ms.
162 lock.Release();
163
164 lock.Acquire();
165 cv.TimedWait(kTenMs); // Wait for 10 ms.
166 cv.TimedWait(kTenMs); // Wait for 10 ms.
167 cv.TimedWait(kTenMs); // Wait for 10 ms.
168 lock.Release();
169} // Call for cv destruction.
170
171TEST_F(ConditionVariableTest, TimeoutTest) {
172 Lock lock;

Callers

nothing calls this directly

Calls 15

EveryIdWasAllocatedMethod · 0.80
all_threads_have_idsMethod · 0.80
task_countMethod · 0.80
ResetHistoryMethod · 0.80
SetTaskCountMethod · 0.80
SetWorkTimeMethod · 0.80

Tested by

no test coverage detected