X Tutup
Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,19 @@ jobs:
# TODO: Once test/Npgsql.Specification.Tests work, switch to just testing on the solution
- name: Test
run: |
dotnet test -c ${{ matrix.config }} -f ${{ matrix.test_tfm }} test/Npgsql.Tests --logger "GitHubActions;report-warnings=false" --blame-hang-timeout 30s
dotnet test -c ${{ matrix.config }} -f ${{ matrix.test_tfm }} test/Npgsql.Tests --logger "GitHubActions;report-warnings=false" --blame-crash --blame-hang-timeout 30s
dotnet test -c ${{ matrix.config }} -f ${{ matrix.test_tfm }} test/Npgsql.DependencyInjection.Tests --logger "GitHubActions;report-warnings=false"
shell: bash

- name: Upload Test Hang Dumps
uses: actions/upload-artifact@v6
if: failure()
with:
name: test-hang-dumps
path: |
**/*.dmp
**/Sequence*.xml

- name: Test Plugins
if: "!startsWith(matrix.os, 'macos')"
run: |
Expand Down
5 changes: 3 additions & 2 deletions src/Npgsql/Internal/NpgsqlConnector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,7 @@ async Task ConnectAsync(NpgsqlTimeout timeout, CancellationToken cancellationTok
}
else
{
IPAddress[] ipAddresses;
IPAddress[] ipAddresses = [];
try
{
using var combinedCts = timeout.IsSet ? CancellationTokenSource.CreateLinkedTokenSource(cancellationToken) : null;
Expand All @@ -1352,7 +1352,8 @@ async Task ConnectAsync(NpgsqlTimeout timeout, CancellationToken cancellationTok
catch (OperationCanceledException)
{
cancellationToken.ThrowIfCancellationRequested();
throw new TimeoutException();
Debug.Assert(timeout.HasExpired);
ThrowHelper.ThrowNpgsqlExceptionWithInnerTimeoutException("The operation has timed out");
}
}
catch (SocketException ex)
Expand Down
Loading
X Tutup