{"id":15598542,"url":"https://github.com/fluffynuts/nunit-retry-with-timeout","last_synced_at":"2025-07-04T06:07:56.928Z","repository":{"id":200543438,"uuid":"705758733","full_name":"fluffynuts/nunit-retry-with-timeout","owner":"fluffynuts","description":"Provides a test decorator, [RetryWithTimeout(...)] which allows retrying tests with per-test and overall timeouts, working around a common problem with [Retry(...)] and [Timeout(...)] being on the same test","archived":false,"fork":false,"pushed_at":"2023-10-20T10:00:06.000Z","size":99,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-24T11:17:17.879Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fluffynuts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-16T16:28:55.000Z","updated_at":"2023-10-16T16:37:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"648e0fd4-18b7-4c7b-9d06-50b83293de5d","html_url":"https://github.com/fluffynuts/nunit-retry-with-timeout","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"c75791cba7c696562e83ddd3e9730623972ac37c"},"previous_names":["fluffynuts/nunit-retry-with-timeout"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/fluffynuts/nunit-retry-with-timeout","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluffynuts%2Fnunit-retry-with-timeout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluffynuts%2Fnunit-retry-with-timeout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluffynuts%2Fnunit-retry-with-timeout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluffynuts%2Fnunit-retry-with-timeout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fluffynuts","download_url":"https://codeload.github.com/fluffynuts/nunit-retry-with-timeout/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluffynuts%2Fnunit-retry-with-timeout/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263457194,"owners_count":23469292,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T01:40:31.916Z","updated_at":"2025-07-04T06:07:56.902Z","avatar_url":"https://github.com/fluffynuts.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nunit-retry-with-timeout\nProvides a test decorator, `[RetryWithTimeout(...)]` which allows retrying tests with per-test \nand overall timeouts, working around a common problem with `[Retry(...)]` and `[Timeout(...)]`\nbeing on the same test.\n\nexamples:\n\nThe most common one: you'd like to retry a test if it fails, and only allow\na certain amount of time per test attempt. Currently, with NUnit, if the `[Timeout]`\nattribute causes a test to fail due to timeout, `[Retry]` is essentially ignored.\n\nAlso, NUnit's [Retry] only retries on AssertionExceptions - not if some other\nexception is thrown, which is particularly annoying if you're using an assertions\nframework other than NUnit's, because you have to wrap the entire test in\n```csharp\nAssert.That(() =\u003e\n    {\n    ... // original test code\n    }, Throws.Nothing\n);\n```\n\nInstead, try:\n\n```csharp\n/*\n* Retries the test up to 3 times, after _any_ exception, not just NUnit exceptions,\n*  with a per-test timeout of 5 seconds.\n*/\n[RetryWithTimeout(3, 5000)]\n[Test]\npublic void SomeFlakyTest()\n{\n}\n```\n\nThere's also an edge case for when you'd like to allow up to a certain amount of time\nper test, but less time than `retries` x `timeout` for the overall test, eg a test\nwhich passes most of the time, but _sometimes_ hangs, perhaps due to network issues:\n\n```csharp\n/*\n* Retries the test up to 3 times, with a per-test\n*  timeout of 2 seconds and an overall timeout of \n*  5 seconds - so if the first two attempts fail,\n*  the last one will essentially have only 1s to run\n*/\n[RetryWithTimeout(3, 2000, 5000)]\n[Test]\npublic void AnotherFlakyTest()\n{\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluffynuts%2Fnunit-retry-with-timeout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluffynuts%2Fnunit-retry-with-timeout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluffynuts%2Fnunit-retry-with-timeout/lists"}