Skip to content

Commit

Permalink
Do not test throwing things other than exceptions from the thread pool.
Browse files Browse the repository at this point in the history
  • Loading branch information
teo-tsirpanis committed Jun 13, 2024
1 parent f96a68d commit c176296
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tiledb/common/thread_pool/test/unit_thread_pool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ TEST_CASE("ThreadPool: Test Exceptions", "[threadpool][exceptions]") {
results.push_back(pool.execute([&result]() {
auto tmp = result++;
if (tmp == 13) {
throw(std::string("Unripe banana"));
throw std::exception("Unripe banana");
}
}));
}
Expand Down Expand Up @@ -479,10 +479,10 @@ TEST_CASE("ThreadPool: Test Exceptions", "[threadpool][exceptions]") {
results.push_back(pool.execute([&result]() {
auto tmp = result++;
if (tmp == 13) {
throw(std::string("Unripe banana"));
throw std::string("Unripe banana");
}
if (tmp == 31) {
throw(Status_TileError("Unbaked potato"));
throw std::exception("Unbaked potato");
}
}));
}
Expand All @@ -500,10 +500,10 @@ TEST_CASE("ThreadPool: Test Exceptions", "[threadpool][exceptions]") {
results.push_back(pool.execute([&result]() {
auto tmp = result++;
if (tmp == 31) {
throw(std::string("Unripe banana"));
throw std::string("Unripe banana");
}
if (tmp == 13) {
throw(Status_TileError("Unbaked potato"));
throw std::exception("Unbaked potato");
}
}));
}
Expand All @@ -521,10 +521,10 @@ TEST_CASE("ThreadPool: Test Exceptions", "[threadpool][exceptions]") {
results.push_back(pool.execute([i, &result]() {
result++;
if (i == 13) {
throw(std::string("Unripe banana"));
throw std::exception("Unripe banana");
}
if (i == 31) {
throw(Status_TileError("Unbaked potato"));
throw std::exception("Unbaked potato");
}
}));
}
Expand All @@ -542,10 +542,10 @@ TEST_CASE("ThreadPool: Test Exceptions", "[threadpool][exceptions]") {
results.push_back(pool.execute([i, &result]() {
++result;
if (i == 31) {
throw(std::string("Unripe banana"));
throw(std::exception("Unripe banana"));
}
if (i == 13) {
throw(Status_TileError("Unbaked potato"));
throw std::exception("Unbaked potato");
}
}));
}
Expand Down

0 comments on commit c176296

Please sign in to comment.