Skip to content

Commit 011e9c8

Browse files
committed
Fixed another examples test.
1 parent bc9910c commit 011e9c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/microservice/main_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -553,9 +553,9 @@ func TestIntegrationFlow(t *testing.T) {
553553
handler(w, req)
554554

555555
resp := w.Result()
556-
// Expect 503 due to external service failure
557-
if resp.StatusCode != http.StatusServiceUnavailable {
558-
t.Errorf("Expected status 503 (external service unavailable), got %d", resp.StatusCode)
556+
// Expect 503 due to external service failure or 500 if one of the payment steps randomly fails
557+
if resp.StatusCode != http.StatusServiceUnavailable && resp.StatusCode != http.StatusInternalServerError {
558+
t.Errorf("Expected status 503 (external service unavailable) or 500 (internal error), got %d", resp.StatusCode)
559559
}
560560

561561
// Check response headers - trace ID should be propagated

0 commit comments

Comments
 (0)