MCPcopy Create free account
hub / github.com/apache/impala / ContinuousIssueTraceStatement

Function ContinuousIssueTraceStatement

be/src/kudu/util/threadpool-test.cc:184–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184static void ContinuousIssueTraceStatement(ThreadPoolToken* token) {
185 Random r(SeedRandom());
186 // delay_ms is a random time: 1ms or 2ms or 3ms.
187 int delay_ms = 1 + static_cast<int>(r.Uniform(3));
188 Status status = token->Schedule(std::bind(&ContinuousIssueTraceStatement, token), delay_ms);
189 // At the case, 'pool_->Shutdown();' would shutdown its SchedulerThread firstly, after that
190 // 'token->Scheduler(...)' would return a IllegalState.
191 LOG_IF(WARNING, !status.ok()) << "ContinuousIssueTraceStatement: " << status.ToString();
192 ASSERT_TRUE(status.ok() || status.IsIllegalState());
193}
194
195TEST_F(ThreadPoolTest, TestExtremeScheduler) {
196 // The case is for the scenario:

Callers 1

TEST_FFunction · 0.85

Calls 6

SeedRandomFunction · 0.85
bindFunction · 0.85
UniformMethod · 0.45
ScheduleMethod · 0.45
okMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected