Skip to content

Commit

Permalink
Raft
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Maruszak <maruszaktomasz@gmail.com>
  • Loading branch information
zarusz committed Jul 7, 2023
1 parent e3fa470 commit 431226e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public async Task When_SendRequest_And_ResponseArrives_Then_ResponseIsReturned(b
_socketClient.OnMessageSend(async (endPoint, payload) =>
{
// Send response for request
if (IPEndPointAddress.From(endPoint) == remoteAddress && payload == requestPayload)
if (IPEndPointAddress.From(endPoint).Equals(remoteAddress) && payload == requestPayload)
{
await _socketClient.OnMessageArrived(endPoint, responsePayload);
}
Expand All @@ -75,11 +75,14 @@ public async Task When_SendRequest_And_ResponseArrives_Then_ResponseIsReturned(b
{
// completed
responseTask.IsCompleted.Should().BeTrue();
responseTask.IsCanceled.Should().BeFalse();
responseTask.IsFaulted.Should().BeFalse();
responseTask.Result.Should().Be(response);
}
else
{
// canceled
responseTask.IsCompleted.Should().BeTrue();
responseTask.IsCanceled.Should().BeTrue();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public TestSocketClient()

public void Dispose()
{

_tokenSource.Cancel();
_tokenSource.Dispose();

Expand Down

0 comments on commit 431226e

Please sign in to comment.