Skip to content

Commit 56f687c

Browse files
NinjaRocksclaude
andcommitted
Fix emulator dedup window (5m cap) and fail fast on config errors
The emulator caps DuplicateDetectionHistoryTimeWindow at 5m (PT10M was rejected). Lower test-commands-dedup to PT5M. Also make the readiness step fail immediately when the emulator logs a config rejection instead of waiting the full 5-minute timeout. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent f60c00c commit 56f687c

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

.github/azure-emulator/Config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"Queues": [
77
{ "Name": "test-commands", "Properties": { "LockDuration": "PT1M", "MaxDeliveryCount": 10 } },
88
{ "Name": "test-commands.fifo", "Properties": { "LockDuration": "PT1M", "RequiresSession": true, "MaxDeliveryCount": 10 } },
9-
{ "Name": "test-commands-dedup", "Properties": { "LockDuration": "PT1M", "RequiresDuplicateDetection": true, "DuplicateDetectionHistoryTimeWindow": "PT10M", "MaxDeliveryCount": 10 } }
9+
{ "Name": "test-commands-dedup", "Properties": { "LockDuration": "PT1M", "RequiresDuplicateDetection": true, "DuplicateDetectionHistoryTimeWindow": "PT5M", "MaxDeliveryCount": 10 } }
1010
],
1111
"Topics": []
1212
}

.github/workflows/Azure-Build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,18 @@ jobs:
7777
run: |
7878
echo "Waiting for the Service Bus emulator to report ready..."
7979
for i in $(seq 1 60); do
80-
if docker compose logs sb-emulator 2>&1 | grep -qi "Emulator Service is Successfully Up"; then
80+
logs=$(docker compose logs sb-emulator 2>&1)
81+
if echo "$logs" | grep -qi "Emulator Service is Successfully Up"; then
8182
echo "Emulator is ready."
8283
sleep 5 # small settle margin
8384
exit 0
8485
fi
86+
if echo "$logs" | grep -qiE "Error occured while running emulator launcher|Hosting failed to start"; then
87+
echo "ERROR: emulator failed to start (config rejected):"
88+
echo "$logs" | grep -iE "Error occured|Expected" | head -5
89+
docker compose logs
90+
exit 1
91+
fi
8592
echo "Attempt $i/60 - emulator not ready yet, waiting..."
8693
sleep 5
8794
done

0 commit comments

Comments
 (0)