Add public sample for Microsoft.Testing.Extensions.Retry extension#6827
Add public sample for Microsoft.Testing.Extensions.Retry extension#6827
Conversation
Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com>
Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com>
|
@copilot Create new Azure Pipeline that runs the new sample, and publishes test results. |
Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com>
Created
Commit: e326e9c |
Removed Linux job and related tasks from the pipeline.
There was a problem hiding this comment.
@nohwnd What do you think about running this pipeline in PRs as an "optional" pipeline?
There was a problem hiding this comment.
If we put a failing scenario in such pipeline (e.g. where we show how hangdump works, we want the run to fail), will it show up as failing / warning for us. How do we filter out that kind of "noise" while still making it useful.
And how do we make it maintainable? If the hang dump pipeline normally shows red, how do we make sure we keep it working, instead of it failing with some other error that is unexpected?
There was a problem hiding this comment.
@nohwnd This is for retry, not hangdump.
But yeah your question still applies for retry as well.
I was thinking of it mostly as we manually keep monitoring that publishing TRX with retries work on AzDO.
There was a problem hiding this comment.
Can one pipeline look at other pipeline? feels to me like something we "normally" do in dotnet and vs biulds, where the run kicks off another pipeline and then somehow monitors the results of the other pipeline. In that case with a bit of logic our "main" pipeline would be able to kick off "retry-sample" and then "retry-sample-validate" would carry out some check that ensures "retry-sample" worked. It could be similar for hang dump.
We can even write a set of tests that would look at the other pipelines from one pipeline probably. So we don't report on 100 different pipelines.
There was a problem hiding this comment.
Not sure how to do that.
Maybe @ViktorHofer or @akoeplinger could help?
There was a problem hiding this comment.
I'm not aware of an easy way to trigger another pipeline as part of a build or look at results, you'd need to use AzDO REST APIs for that.
Adds a runnable sample demonstrating the platform-level retry extension with a test that fails initially and passes on retry.
Changes
samples/public/mstest-runner/FlakySampleTests.cs- Test using static counter to fail first run, pass on retryProgram.cs- Entry point registering retry provider viaAddRetryProvider()README.md- Clarifies distinction between platform-level retry (retries entire suite) vs[Retry]attribute (retries individual methods)Usage
Expected output shows retry in action:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.