1515using Moq ;
1616using Xunit ;
1717using Xunit . Abstractions ;
18+ using xRetry ;
1819
1920namespace Microsoft . Azure . WebJobs . Extensions . Sql . Tests . Integration
2021{
@@ -28,7 +29,7 @@ public SqlTriggerBindingIntegrationTests(ITestOutputHelper output = null) : base
2829 /// <summary>
2930 /// Ensures that the user function gets invoked for each of the insert, update and delete operation.
3031 /// </summary>
31- [ Theory ]
32+ [ RetryTheory ]
3233 [ SqlInlineData ( ) ]
3334 public async Task SingleOperationTriggerTest ( SupportedLanguages lang )
3435 {
@@ -76,7 +77,7 @@ await this.WaitForProductChanges(
7677 /// Verifies that manually setting the batch size using the original config var correctly changes the
7778 /// number of changes processed at once.
7879 /// </summary>
79- [ Theory ]
80+ [ RetryTheory ]
8081 [ SqlInlineData ( ) ]
8182 public async Task BatchSizeOverrideTriggerTest ( SupportedLanguages lang )
8283 {
@@ -119,7 +120,7 @@ await this.WaitForProductChanges(
119120 /// <summary>
120121 /// Verifies that manually setting the max batch size correctly changes the number of changes processed at once
121122 /// </summary>
122- [ Theory ]
123+ [ RetryTheory ]
123124 [ SqlInlineData ( ) ]
124125 public async Task MaxBatchSizeOverrideTriggerTest ( SupportedLanguages lang )
125126 {
@@ -162,7 +163,7 @@ await this.WaitForProductChanges(
162163 /// <summary>
163164 /// Verifies that manually setting the polling interval correctly changes the delay between processing each batch of changes
164165 /// </summary>
165- [ Theory ]
166+ [ RetryTheory ]
166167 [ SqlInlineData ( ) ]
167168 public async Task PollingIntervalOverrideTriggerTest ( SupportedLanguages lang )
168169 {
@@ -204,7 +205,7 @@ await this.WaitForProductChanges(
204205 /// Verifies that if several changes have happened to the table row since last invocation, then a single net
205206 /// change for that row is passed to the user function.
206207 /// </summary>
207- [ Theory ]
208+ [ RetryTheory ]
208209 [ SqlInlineData ( ) ]
209210 public async Task MultiOperationTriggerTest ( SupportedLanguages lang )
210211 {
@@ -285,7 +286,7 @@ await this.WaitForProductChanges(
285286 /// <summary>
286287 /// Ensures correct functionality with multiple user functions tracking the same table.
287288 /// </summary>
288- [ Theory ]
289+ [ RetryTheory ]
289290 [ SqlInlineData ( ) ]
290291 public async Task MultiFunctionTriggerTest ( SupportedLanguages lang )
291292 {
@@ -411,7 +412,7 @@ public async Task MultiFunctionTriggerTest(SupportedLanguages lang)
411412 /// <summary>
412413 /// Ensures correct functionality with user functions running across multiple functions host processes.
413414 /// </summary>
414- [ Theory ]
415+ [ RetryTheory ]
415416 [ SqlInlineData ( ) ]
416417 public async Task MultiHostTriggerTest ( SupportedLanguages lang )
417418 {
@@ -462,7 +463,7 @@ await this.WaitForProductChanges(
462463 /// <summary>
463464 /// Tests the error message when the user table is not present in the database.
464465 /// </summary>
465- [ Theory ]
466+ [ RetryTheory ]
466467 [ SqlInlineData ( ) ]
467468 public void TableNotPresentTriggerTest ( SupportedLanguages lang )
468469 {
@@ -476,7 +477,7 @@ public void TableNotPresentTriggerTest(SupportedLanguages lang)
476477 /// <summary>
477478 /// Tests the error message when the user table does not contain primary key.
478479 /// </summary>
479- [ Theory ]
480+ [ RetryTheory ]
480481 [ SqlInlineData ( ) ]
481482 public void PrimaryKeyNotCreatedTriggerTest ( SupportedLanguages lang )
482483 {
@@ -491,7 +492,7 @@ public void PrimaryKeyNotCreatedTriggerTest(SupportedLanguages lang)
491492 /// Tests the error message when the user table contains one or more primary keys with names conflicting with
492493 /// column names in the leases table.
493494 /// </summary>
494- [ Theory ]
495+ [ RetryTheory ]
495496 [ SqlInlineData ( ) ]
496497 public void ReservedPrimaryKeyColumnNamesTriggerTest ( SupportedLanguages lang )
497498 {
@@ -506,7 +507,7 @@ public void ReservedPrimaryKeyColumnNamesTriggerTest(SupportedLanguages lang)
506507 /// <summary>
507508 /// Tests the error message when the user table contains columns of unsupported SQL types.
508509 /// </summary>
509- [ Theory ]
510+ [ RetryTheory ]
510511 [ SqlInlineData ( ) ]
511512 public void UnsupportedColumnTypesTriggerTest ( SupportedLanguages lang )
512513 {
@@ -521,7 +522,7 @@ public void UnsupportedColumnTypesTriggerTest(SupportedLanguages lang)
521522 /// <summary>
522523 /// Tests the error message when change tracking is not enabled on the user table.
523524 /// </summary>
524- [ Theory ]
525+ [ RetryTheory ]
525526 [ SqlInlineData ( ) ]
526527 public void ChangeTrackingNotEnabledTriggerTest ( SupportedLanguages lang )
527528 {
@@ -557,7 +558,7 @@ public async void GetMetricsTest()
557558 /// <summary>
558559 /// Tests that when using an unsupported database the expected error is thrown
559560 /// </summary>
560- [ Theory ]
561+ [ RetryTheory ]
561562 [ SqlInlineData ( ) ]
562563 public void UnsupportedDatabaseThrows ( SupportedLanguages lang )
563564 {
0 commit comments