Skip to content

Commit

Permalink
Don't throw an exception at Future#await
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson1978 committed Feb 8, 2024
1 parent a46226b commit 19fbb08
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion ext/ilios/future.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ static VALUE future_await(VALUE self)
GET_FUTURE(self, cassandra_future);

if (cassandra_future->already_waited) {
rb_raise(eExecutionError, "It should not call twice");
return self;
}

if (cassandra_future->on_success_block || cassandra_future->on_failure_block) {
Expand Down
1 change: 0 additions & 1 deletion test/test_future.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ def test_await
prepare_future.await

assert_equal(50, count)
assert_raises(Ilios::Cassandra::ExecutionError) { prepare_future.await }
end

def test_on_success
Expand Down

0 comments on commit 19fbb08

Please sign in to comment.