@@ -551,7 +551,7 @@ public async Task StartRecognizeReceiptsCanAuthenticateWithTokenCredential()
551551 /// </summary>
552552 [ Test ]
553553 [ TestCase ( true ) ]
554- [ TestCase ( false ) ]
554+ [ TestCase ( false , Ignore = "Flaky behavior. Issue https://github.com/Azure/azure-sdk-for-net/issues/18813" ) ]
555555 public async Task StartRecognizeReceiptsPopulatesExtractedReceiptJpg ( bool useStream )
556556 {
557557 var client = CreateFormRecognizerClient ( ) ;
@@ -662,7 +662,7 @@ public async Task StartRecognizeReceiptsPopulatesExtractedReceiptJpg(bool useStr
662662
663663 [ Test ]
664664 [ TestCase ( true ) ]
665- [ TestCase ( false ) ]
665+ [ TestCase ( false , Ignore = "Flaky behavior. Issue https://github.com/Azure/azure-sdk-for-net/issues/18813" ) ]
666666 public async Task StartRecognizeReceiptsPopulatesExtractedReceiptPng ( bool useStream )
667667 {
668668 var client = CreateFormRecognizerClient ( ) ;
@@ -776,7 +776,7 @@ public async Task StartRecognizeReceiptsPopulatesExtractedReceiptPng(bool useStr
776776
777777 [ Test ]
778778 [ TestCase ( true ) ]
779- [ TestCase ( false ) ]
779+ [ TestCase ( false , Ignore = "Flaky behavior. Issue https://github.com/Azure/azure-sdk-for-net/issues/18813" ) ]
780780 public async Task StartRecognizeReceiptsCanParseMultipageForm ( bool useStream )
781781 {
782782 var client = CreateFormRecognizerClient ( ) ;
@@ -932,6 +932,7 @@ public void StartRecognizeReceiptsThrowsForDamagedFile()
932932 /// Recognizer cognitive service and handle returned errors.
933933 /// </summary>
934934 [ Test ]
935+ [ Ignore ( "Flaky behavior. Issue https://github.com/Azure/azure-sdk-for-net/issues/18813" ) ]
935936 public void StartRecognizeReceiptsFromUriThrowsForNonExistingContent ( )
936937 {
937938 var client = CreateFormRecognizerClient ( ) ;
@@ -982,8 +983,13 @@ public void StartRecognizeReceiptsWithWrongLocale()
982983 {
983984 var client = CreateFormRecognizerClient ( ) ;
984985
985- var receiptUri = FormRecognizerTestEnvironment . CreateUri ( TestFile . ReceiptJpg ) ;
986- RequestFailedException ex = Assert . ThrowsAsync < RequestFailedException > ( async ( ) => await client . StartRecognizeReceiptsFromUriAsync ( receiptUri , new RecognizeReceiptsOptions ( ) { Locale = "not-locale" } ) ) ;
986+ using var stream = FormRecognizerTestEnvironment . CreateStream ( TestFile . ReceiptJpg ) ;
987+ RequestFailedException ex ;
988+
989+ using ( Recording . DisableRequestBodyRecording ( ) )
990+ {
991+ ex = Assert . ThrowsAsync < RequestFailedException > ( async ( ) => await client . StartRecognizeReceiptsAsync ( stream , new RecognizeReceiptsOptions ( ) { Locale = "not-locale" } ) ) ;
992+ }
987993 Assert . AreEqual ( "UnsupportedLocale" , ex . ErrorCode ) ;
988994 }
989995
@@ -1019,7 +1025,7 @@ public async Task StartRecognizeBusinessCardsCanAuthenticateWithTokenCredential(
10191025
10201026 [ Test ]
10211027 [ TestCase ( true ) ]
1022- [ TestCase ( false ) ]
1028+ [ TestCase ( false , Ignore = "Flaky behavior. Issue https://github.com/Azure/azure-sdk-for-net/issues/18813" ) ]
10231029 public async Task StartRecognizeBusinessCardsPopulatesExtractedJpg ( bool useStream )
10241030 {
10251031 var client = CreateFormRecognizerClient ( ) ;
@@ -1126,7 +1132,7 @@ public async Task StartRecognizeBusinessCardsPopulatesExtractedJpg(bool useStrea
11261132
11271133 [ Test ]
11281134 [ TestCase ( true ) ]
1129- [ TestCase ( false ) ]
1135+ [ TestCase ( false , Ignore = "Flaky behavior. Issue https://github.com/Azure/azure-sdk-for-net/issues/18813" ) ]
11301136 public async Task StartRecognizeBusinessCardsPopulatesExtractedPng ( bool useStream )
11311137 {
11321138 var client = CreateFormRecognizerClient ( ) ;
@@ -1306,6 +1312,7 @@ public void StartRecognizeBusinessCardsThrowsForDamagedFile()
13061312 /// Recognizer cognitive service and handle returned errors.
13071313 /// </summary>
13081314 [ Test ]
1315+ [ Ignore ( "Flaky behavior. Issue https://github.com/Azure/azure-sdk-for-net/issues/18813" ) ]
13091316 public void StartRecognizeBusinessCardsFromUriThrowsForNonExistingContent ( )
13101317 {
13111318 var client = CreateFormRecognizerClient ( ) ;
@@ -1317,7 +1324,7 @@ public void StartRecognizeBusinessCardsFromUriThrowsForNonExistingContent()
13171324
13181325 [ Test ]
13191326 [ TestCase ( true ) ]
1320- [ TestCase ( false ) ]
1327+ [ TestCase ( false , Ignore = "Flaky behavior. Issue https://github.com/Azure/azure-sdk-for-net/issues/18813" ) ]
13211328 public async Task StartRecognizeBusinessCardsCanParseMultipageForm ( bool useStream )
13221329 {
13231330 var client = CreateFormRecognizerClient ( ) ;
@@ -1418,8 +1425,13 @@ public void StartRecognizeBusinessCardsWithWrongLocale()
14181425 {
14191426 var client = CreateFormRecognizerClient ( ) ;
14201427
1421- var businessCardsUri = FormRecognizerTestEnvironment . CreateUri ( TestFile . BusinessCardJpg ) ;
1422- RequestFailedException ex = Assert . ThrowsAsync < RequestFailedException > ( async ( ) => await client . StartRecognizeBusinessCardsFromUriAsync ( businessCardsUri , new RecognizeBusinessCardsOptions ( ) { Locale = "not-locale" } ) ) ;
1428+ using var stream = FormRecognizerTestEnvironment . CreateStream ( TestFile . BusinessCardJpg ) ;
1429+ RequestFailedException ex ;
1430+
1431+ using ( Recording . DisableRequestBodyRecording ( ) )
1432+ {
1433+ ex = Assert . ThrowsAsync < RequestFailedException > ( async ( ) => await client . StartRecognizeBusinessCardsAsync ( stream , new RecognizeBusinessCardsOptions ( ) { Locale = "not-locale" } ) ) ;
1434+ }
14231435 Assert . AreEqual ( "UnsupportedLocale" , ex . ErrorCode ) ;
14241436 }
14251437
@@ -1455,7 +1467,7 @@ public async Task StartRecognizeInvoicesCanAuthenticateWithTokenCredential()
14551467
14561468 [ Test ]
14571469 [ TestCase ( true ) ]
1458- [ TestCase ( false ) ]
1470+ [ TestCase ( false , Ignore = "Flaky behavior. Issue https://github.com/Azure/azure-sdk-for-net/issues/18813" ) ]
14591471 public async Task StartRecognizeInvoicesPopulatesExtractedPdf ( bool useStream )
14601472 {
14611473 var client = CreateFormRecognizerClient ( ) ;
@@ -1523,7 +1535,7 @@ public async Task StartRecognizeInvoicesPopulatesExtractedPdf(bool useStream)
15231535
15241536 [ Test ]
15251537 [ TestCase ( true ) ]
1526- [ TestCase ( false ) ]
1538+ [ TestCase ( false , Ignore = "Flaky behavior. Issue https://github.com/Azure/azure-sdk-for-net/issues/18813" ) ]
15271539 public async Task StartRecognizeInvoicesPopulatesExtractedTiff ( bool useStream )
15281540 {
15291541 var client = CreateFormRecognizerClient ( ) ;
@@ -1652,7 +1664,7 @@ public async Task StartRecognizeInvoicesCanParseBlankPage()
16521664
16531665 [ Test ]
16541666 [ TestCase ( true ) ]
1655- [ TestCase ( false ) ]
1667+ [ TestCase ( false , Ignore = "Flaky behavior. Issue https://github.com/Azure/azure-sdk-for-net/issues/18813" ) ]
16561668 public async Task StartRecognizeInvoicesCanParseMultipageForm ( bool useStream )
16571669 {
16581670 var client = CreateFormRecognizerClient ( ) ;
@@ -1730,6 +1742,7 @@ public void StartRecognizeInvoicesThrowsForDamagedFile()
17301742 /// Recognizer cognitive service and handle returned errors.
17311743 /// </summary>
17321744 [ Test ]
1745+ [ Ignore ( "Flaky behavior. Issue https://github.com/Azure/azure-sdk-for-net/issues/18813" ) ]
17331746 public void StartRecognizeInvoicesFromUriThrowsForNonExistingContent ( )
17341747 {
17351748 var client = CreateFormRecognizerClient ( ) ;
@@ -1780,8 +1793,13 @@ public void StartRecognizeInvoicesWithWrongLocale()
17801793 {
17811794 var client = CreateFormRecognizerClient ( ) ;
17821795
1783- var receiptUri = FormRecognizerTestEnvironment . CreateUri ( TestFile . ReceiptJpg ) ;
1784- RequestFailedException ex = Assert . ThrowsAsync < RequestFailedException > ( async ( ) => await client . StartRecognizeInvoicesFromUriAsync ( receiptUri , new RecognizeInvoicesOptions ( ) { Locale = "not-locale" } ) ) ;
1796+ using var stream = FormRecognizerTestEnvironment . CreateStream ( TestFile . InvoicePdf ) ;
1797+ RequestFailedException ex ;
1798+
1799+ using ( Recording . DisableRequestBodyRecording ( ) )
1800+ {
1801+ ex = Assert . ThrowsAsync < RequestFailedException > ( async ( ) => await client . StartRecognizeInvoicesAsync ( stream , new RecognizeInvoicesOptions ( ) { Locale = "not-locale" } ) ) ;
1802+ }
17851803 Assert . AreEqual ( "UnsupportedLocale" , ex . ErrorCode ) ;
17861804 }
17871805
0 commit comments