Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix error message being overridden by exception #592

Merged
merged 3 commits into from
Mar 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion Neo4j.Driver/Neo4j.Driver.Tests.TestBackend/TestBlackList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ static class TestBlackList
("test_routing_v3.RoutingV3.test_should_successfully_send_multiple_bookmarks",
"Test failing requires investigation"),


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has this one been flaky for long?

("test_routing_v4x4.RoutingV4x4.test_should_enforce_pool_size_per_cluster_member",
"flakey"),

("test_should_revert_to_initial_router_if_known_router_throws_protocol_errors",
"Test failing requires investigation"),
Expand Down
2 changes: 1 addition & 1 deletion Neo4j.Driver/Neo4j.Driver.Tests/ConnectionPoolTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ public async void ShouldTimeoutAfterAcquireAsyncTimeoutIfPoolIsFull()
stopWatch.Stop();
stopWatch.Elapsed.TotalSeconds.Should().BeGreaterOrEqualTo(10, 0.1);
exception.Should().BeOfType<ClientException>();
exception.Message.Should().StartWith("Failed to obtain a connection from pool within");
exception.Message.Should().StartWith("Failed to obtain a connection from pool");
}

[Fact]
Expand Down
4 changes: 2 additions & 2 deletions Neo4j.Driver/Neo4j.Driver/Internal/ConnectionPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ private async Task<IPooledConnection> AcquireOrTimeoutAsync(AccessMode mode, str
_poolMetricsListener?.PoolTimedOutToAcquire();
if (cts.Token.IsCancellationRequested)
throw new ClientException(
$"Failed to obtain a connection from pool within {_connectionAcquisitionTimeout}", ex);
$"Failed to obtain a connection from pool within {_connectionAcquisitionTimeout}");

throw new ClientException("Failed to obtain a connection from pool", ex);
throw new ClientException("Failed to obtain a connection from pool");
}
}

Expand Down