Skip to content

Commit

Permalink
fixed test that expects Status.Failure to expect an exception instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Ondřej Vondra committed Nov 11, 2024
1 parent 9f7f91b commit cc256aa
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/core/Akka.Tests/Actor/InboxSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,7 @@ public void Select_WithClient_should_update_Client_and_copy_the_rest_of_the_prop
public async Task Inbox_Receive_will_timeout_gracefully_if_timeout_is_already_expired()
{
var task = _inbox.ReceiveAsync(TimeSpan.FromSeconds(-1));
Assert.True(await task.AwaitWithTimeout(TimeSpan.FromMilliseconds(1000)), "Receive did not complete in time.");
Assert.IsType<Status.Failure>(task.Result);
await Assert.ThrowsAnyAsync<Exception>(() => task.AwaitWithTimeout(TimeSpan.FromMilliseconds(1000)));
}
}
}

0 comments on commit cc256aa

Please sign in to comment.