Skip to content

Make retry logic more resilient to changes in xunit/vstest output#62

Merged
kzu merged 1 commit intomainfrom
dev/resilient-retries
Feb 18, 2025
Merged

Make retry logic more resilient to changes in xunit/vstest output#62
kzu merged 1 commit intomainfrom
dev/resilient-retries

Conversation

@kzu
Copy link
Member

@kzu kzu commented Feb 18, 2025

There was a significant change in output from dotnet test/vstest/xunit which caused us to bail too early and not retry properly.

We know the output (for now?) will contain the phrasing Results file: {path}\{filename}.trx, but we don't want to make that detection too fragile either. So we just check for the presence of the directory we pass as results dir, which should be always available in standard output.

Fixes #48

There was a significant change in output from dotnet test/vstest/xunit which caused us to bail too early and not retry properly.

We know the output (for now?) will contain the phrasing `Results file: {path}\{filename}.trx`, but we don't want to make that detection too fragile either. So we just check for the presence of the directory we pass as results dir, which should be always available in standard output.

Fixes #48
@kzu kzu added the bug Something isn't working label Feb 18, 2025
@kzu
Copy link
Member Author

kzu commented Feb 18, 2025

4 passed 4 passed
4 passed 4 passed
4 passed 4 passed

🧪 Details on macOS Unix 14.7.2

✅ Sample.UnitTest1.FailsOnce
✅ Sample.UnitTest1.FailsTwice
✅ Sample.UnitTest1.Test1(value: 1)
✅ Sample.UnitTest1.Test1(value: 2)

🧪 Details on Ubuntu 24.04.1 LTS

✅ Sample.UnitTest1.FailsOnce
✅ Sample.UnitTest1.FailsTwice
✅ Sample.UnitTest1.Test1(value: 1)
✅ Sample.UnitTest1.Test1(value: 2)

🧪 Details on Microsoft Windows 10.0.20348

✅ Sample.UnitTest1.FailsOnce
✅ Sample.UnitTest1.FailsTwice
✅ Sample.UnitTest1.Test1(value: 1)
✅ Sample.UnitTest1.Test1(value: 2)

from dotnet-retest v42.42.201-pr62 on .NET 8.0.12 with 💜

@kzu kzu enabled auto-merge (rebase) February 18, 2025 10:10
@kzu kzu merged commit 358eb4e into main Feb 18, 2025
9 checks passed
@kzu kzu deleted the dev/resilient-retries branch February 18, 2025 10:11
@devlooped devlooped locked and limited conversation to collaborators Mar 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Retry attempts are not working anymore in 0.6.X

1 participant