Skip to content

Commit a7f3587

Browse files
Add sleep
1 parent 9f21868 commit a7f3587

File tree

1 file changed

+2
-1
lines changed
  • tracer/test/test-applications/integrations/Samples.Microsoft.Data.SqlClient

1 file changed

+2
-1
lines changed

tracer/test/test-applications/integrations/Samples.Microsoft.Data.SqlClient/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ private static DbConnection OpenConnection(Type connectionType)
6363
Console.WriteLine($"Connection attempt {attempt}/{maxAttempts} failed. Retrying...");
6464
Console.WriteLine($"SqlException Number: {ex.Number}, State: {ex.State}, Class: {ex.Class}");
6565
Console.WriteLine($"Message: {ex.Message}");
66+
Thread.Sleep(1000 * attempt);
6667
}
6768
}
6869
catch (Exception ex)
@@ -78,7 +79,7 @@ private static DbConnection OpenConnection(Type connectionType)
7879
Console.WriteLine($"Final SqlException Number: {lastException.Number}, State: {lastException.State}, Class: {lastException.Class}");
7980
Console.WriteLine($"Message: {lastException.Message}");
8081
Environment.Exit(13);
81-
throw lastException; // Never reached, but satisfies compiler
82+
return null;
8283
}
8384
}
8485
}

0 commit comments

Comments
 (0)