From 64b60ed970fb77964f8f5fabb381728944d916a2 Mon Sep 17 00:00:00 2001 From: Josh Elkins Date: Thu, 16 Jan 2025 17:32:31 -0600 Subject: [PATCH] Add a failure message to transcribe streaming test --- .../TranscribeStreamingTests.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/IntegrationTests/Services/AWSTranscribeStreamingIntegrationTests/TranscribeStreamingTests.swift b/IntegrationTests/Services/AWSTranscribeStreamingIntegrationTests/TranscribeStreamingTests.swift index b294cd8e11e..cc13dfbfbc5 100644 --- a/IntegrationTests/Services/AWSTranscribeStreamingIntegrationTests/TranscribeStreamingTests.swift +++ b/IntegrationTests/Services/AWSTranscribeStreamingIntegrationTests/TranscribeStreamingTests.swift @@ -101,7 +101,10 @@ final class TranscribeStreamingTests: XCTestCase { "Hello transcribed streaming from swift sdk.", "Hello transcribes streaming from Swift SDK.", ] - XCTAssertTrue(candidates.contains(where: { $0.lowercased() == fullMessage.lowercased() })) + XCTAssertTrue( + candidates.contains { $0.lowercased() == fullMessage.lowercased() }, + "The transcription \"\(fullMessage)\" does not match any of the expected forms: [\(candidates.map { "\"\($0)\"" }.joined(separator: ", "))]" + ) } // Performs the stream transcription, with retry for selected errors associated with