Skip to content

Commit

Permalink
Throw an exception rather than aborting when wait_for_session times out
Browse files Browse the repository at this point in the history
  • Loading branch information
tgoyne committed Oct 3, 2022
1 parent 2d7bfd2 commit 868bf48
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/object-store/util/test_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,9 @@ static std::error_code wait_for_session(Realm& realm,
bool completed = cv.wait_for(lock, timeout, [&]() {
return wait_flag == true;
});
REALM_ASSERT_RELEASE(completed);
if (!completed) {
throw std::runtime_error("wait_For_session() timed out");
}
return ec;
}

Expand Down

0 comments on commit 868bf48

Please sign in to comment.