Skip to content

Commit ebba739

Browse files
committed
* Re-enable toxiproxy tests
* Remove max outstanding confirms check, because that is what is causing issues right now.
1 parent abf31be commit ebba739

File tree

2 files changed

+13
-20
lines changed

2 files changed

+13
-20
lines changed

.github/workflows/build-test.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ jobs:
6969
- name: Integration Tests
7070
timeout-minutes: 25
7171
run: |
72-
# $tx = Start-Job -Verbose -ScriptBlock { & "${{ github.workspace }}\.ci\windows\toxiproxy\toxiproxy-server.exe" }; `
73-
# Start-Sleep -Seconds 1; `
74-
# Receive-Job -Job $tx; `
75-
# & "${{ github.workspace }}\.ci\windows\toxiproxy\toxiproxy-cli.exe" list; `
72+
$tx = Start-Job -Verbose -ScriptBlock { & "${{ github.workspace }}\.ci\windows\toxiproxy\toxiproxy-server.exe" }; `
73+
Start-Sleep -Seconds 1; `
74+
Receive-Job -Job $tx; `
75+
& "${{ github.workspace }}\.ci\windows\toxiproxy\toxiproxy-cli.exe" list; `
7676
dotnet test `
7777
--environment 'RABBITMQ_LONG_RUNNING_TESTS=true' `
7878
--environment "RABBITMQ_RABBITMQCTL_PATH=${{ steps.install-start-rabbitmq.outputs.path }}" `
79-
--environment 'RABBITMQ_TOXIPROXY_TESTS=false' `
79+
--environment 'RABBITMQ_TOXIPROXY_TESTS=true' `
8080
--environment 'PASSWORD=grapefruit' `
8181
--environment SSL_CERTS_DIR="${{ github.workspace }}\.ci\certs" `
8282
"${{ github.workspace }}\projects\Test\Integration\Integration.csproj" --no-restore --no-build --logger 'console;verbosity=detailed'
@@ -185,14 +185,14 @@ jobs:
185185
path: projects
186186
- name: Start RabbitMQ
187187
id: start-rabbitmq
188-
run: ${{ github.workspace }}/.ci/ubuntu/gha-setup.sh no-toxiproxy
188+
run: ${{ github.workspace }}/.ci/ubuntu/gha-setup.sh toxiproxy
189189
- name: Integration Tests
190190
timeout-minutes: 15
191191
run: |
192192
dotnet test \
193193
--environment 'RABBITMQ_LONG_RUNNING_TESTS=true' \
194194
--environment "RABBITMQ_RABBITMQCTL_PATH=DOCKER:${{ steps.start-rabbitmq.outputs.id }}" \
195-
--environment 'RABBITMQ_TOXIPROXY_TESTS=false' \
195+
--environment 'RABBITMQ_TOXIPROXY_TESTS=true' \
196196
--environment 'PASSWORD=grapefruit' \
197197
--environment SSL_CERTS_DIR="${{ github.workspace }}/.ci/certs" \
198198
"${{ github.workspace }}/projects/Test/Integration/Integration.csproj" --no-restore --no-build --logger 'console;verbosity=detailed'

projects/RabbitMQ.Client/Impl/Channel.PublisherConfirms.cs

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -282,17 +282,16 @@ await _confirmSemaphore.WaitAsync(reason.CancellationToken)
282282
{
283283
if (_publisherConfirmationsEnabled)
284284
{
285+
/*
285286
if (_publisherConfirmationTrackingEnabled)
286287
{
287-
if (_maxOutstandingPublisherConfirmations is not null)
288+
if (_maxOutstandingConfirmationsSemaphore is not null)
288289
{
289-
int percentOfMax = _confirmsTaskCompletionSources.Count / (int)_maxOutstandingPublisherConfirmations;
290-
if (percentOfMax > 0.5)
291-
{
292-
await Task.Delay(1000 * percentOfMax).ConfigureAwait(false);
293-
}
290+
await _maxOutstandingConfirmationsSemaphore.WaitAsync(cancellationToken)
291+
.ConfigureAwait(false);
294292
}
295293
}
294+
*/
296295

297296
await _confirmSemaphore.WaitAsync(cancellationToken)
298297
.ConfigureAwait(false);
@@ -304,12 +303,6 @@ await _confirmSemaphore.WaitAsync(cancellationToken)
304303
{
305304
publisherConfirmationTcs = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
306305
_confirmsTaskCompletionSources[publishSequenceNumber] = publisherConfirmationTcs;
307-
308-
if (_maxOutstandingConfirmationsSemaphore is not null)
309-
{
310-
await _maxOutstandingConfirmationsSemaphore.WaitAsync(cancellationToken)
311-
.ConfigureAwait(false);
312-
}
313306
}
314307

315308
_nextPublishSeqNo++;
@@ -361,7 +354,7 @@ await publisherConfirmationInfo.MaybeWaitForConfirmationAsync(cancellationToken)
361354
if (_publisherConfirmationTrackingEnabled &&
362355
_maxOutstandingConfirmationsSemaphore is not null)
363356
{
364-
_maxOutstandingConfirmationsSemaphore.Release();
357+
// _maxOutstandingConfirmationsSemaphore.Release();
365358
}
366359
}
367360
}

0 commit comments

Comments
 (0)