mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Merge pull request #49755 from CurtizJ/fix-unit-test
Fix unit test `ExceptionFromWait`
This commit is contained in:
commit
d147cb105c
@ -56,8 +56,17 @@ static bool check2()
|
||||
{
|
||||
ThreadPool pool(CurrentMetrics::LocalThread, CurrentMetrics::LocalThreadActive, 2);
|
||||
|
||||
pool.scheduleOrThrowOnError([&]{ throw std::runtime_error("Hello, world!"); });
|
||||
pool.scheduleOrThrowOnError([]{});
|
||||
try
|
||||
{
|
||||
pool.scheduleOrThrowOnError([&]{ throw std::runtime_error("Hello, world!"); });
|
||||
pool.scheduleOrThrowOnError([]{});
|
||||
}
|
||||
catch (const std::runtime_error &)
|
||||
{
|
||||
/// Sometimes exception may be thrown from schedule.
|
||||
/// Just retry test in that case.
|
||||
return true;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user