diff --git a/exercises/practice/bank-account/bank_account_test.cpp b/exercises/practice/bank-account/bank_account_test.cpp index 32888a3c..606ad498 100644 --- a/exercises/practice/bank-account/bank_account_test.cpp +++ b/exercises/practice/bank-account/bank_account_test.cpp @@ -60,7 +60,7 @@ TEST_CASE("Can do multiple operations sequentially", REQUIRE(account.balance() == 20); } -TEST_CASE("annot check balance of closed account", +TEST_CASE("Cannot check balance of closed account", "[f9facfaa-d824-486e-8381-48832c4bbffd]") { Bankaccount::Bankaccount account{}; account.open(); @@ -150,12 +150,16 @@ TEST_CASE("Can handle concurrent transactions", std::vector vec_of_threads; - for (int i = 0; i < 1000; ++i) { + for (int i = 0; i < 10; ++i) { vec_of_threads.push_back(std::thread([&]() { using namespace std::chrono_literals; - account.deposit(1); - std::this_thread::sleep_for(5ms); - account.withdraw(1); + for (int j{0}; j < 100; ++j) { + account.deposit(1); + std::this_thread::sleep_for(1ms); + } + for (int j{0}; j < 100; ++j) { + account.withdraw(1); + } })); }