Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2.1k
C#: Increase attempts to reach nuget.org in integration tests to reduce flakiness.#20396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,2 +1,9 @@ | ||||||||||||||||||||||||
| import os | ||||||||||||||||||||||||
| def test(codeql, csharp): | ||||||||||||||||||||||||
| # Making sure the reachability test of `nuget.org` succeeds: | ||||||||||||||||||||||||
| os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_FALLBACK_TIMEOUT"] = "1000" | ||||||||||||||||||||||||
| os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_FALLBACK_LIMIT"] = "5" | ||||||||||||||||||||||||
Comment on lines
4
to
+7
CopilotAI | ||||||||||||||||||||||||
| deftest(codeql, csharp): | |
| # Making sure the reachability test of `nuget.org` succeeds: | |
| os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_FALLBACK_TIMEOUT"] ="1000" | |
| os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_FALLBACK_LIMIT"] ="5" | |
| NUGET_FEEDS_CHECK_FALLBACK_TIMEOUT_MS="1000" | |
| NUGET_FEEDS_CHECK_FALLBACK_LIMIT="5" | |
| deftest(codeql, csharp): | |
| # Making sure the reachability test of `nuget.org` succeeds: | |
| os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_FALLBACK_TIMEOUT"] =NUGET_FEEDS_CHECK_FALLBACK_TIMEOUT_MS | |
| os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_FALLBACK_LIMIT"] =NUGET_FEEDS_CHECK_FALLBACK_LIMIT |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,6 +1,11 @@ | ||||||||||||||||||||||||||||||||
| import os | ||||||||||||||||||||||||||||||||
| import runs_on | ||||||||||||||||||||||||||||||||
| @runs_on.posix | ||||||||||||||||||||||||||||||||
| def test(codeql, csharp): | ||||||||||||||||||||||||||||||||
| # Making sure the reachability test of `nuget.org` succeeds: | ||||||||||||||||||||||||||||||||
| os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_FALLBACK_TIMEOUT"] = "1000" | ||||||||||||||||||||||||||||||||
| os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_FALLBACK_LIMIT"] = "5" | ||||||||||||||||||||||||||||||||
Comment on lines
4
to
+9
CopilotAI | ||||||||||||||||||||||||||||||||
| @runs_on.posix | |
| deftest(codeql, csharp): | |
| # Making sure the reachability test of `nuget.org` succeeds: | |
| os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_FALLBACK_TIMEOUT"] ="1000" | |
| os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_FALLBACK_LIMIT"] ="5" | |
| # Constants for NuGet feeds check fallback configuration | |
| NUGET_FEEDS_CHECK_FALLBACK_TIMEOUT_MS="1000" | |
| NUGET_FEEDS_CHECK_FALLBACK_LIMIT="5" | |
| @runs_on.posix | |
| deftest(codeql, csharp): | |
| # Making sure the reachability test of `nuget.org` succeeds: | |
| os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_FALLBACK_TIMEOUT"] =NUGET_FEEDS_CHECK_FALLBACK_TIMEOUT_MS | |
| os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_FALLBACK_LIMIT"] =NUGET_FEEDS_CHECK_FALLBACK_LIMIT |
Uh oh!
There was an error while loading. Please reload this page.
CopilotAISep 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider extracting these magic numbers (1000, 5) into named constants at the module level to improve maintainability and ensure consistency across test files.