Skip to content

Commit

Permalink
Retry the other test that has the same issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyKuhne committed Feb 4, 2024
1 parent a7ee597 commit 452ce51
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/thirtytwo_tests/Win32/Foundation/HRESULTTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ namespace Windows.Win32.Foundation;

public class HRESULTTests
{
[Fact]
[RetryFact(MaxRetries = 5)]
public void HRESULT_ToStringWithDescription()
{
// The Marshal.GetExceptionForHR method is not thread safe for CLR (COR_E*) HRESULTs.
// We don't control all threads in the process, so we have to retry a few times.

// .NET exception messages aren't localized. (Only .NET Framework)
string message = HRESULT.COR_E_OBJECTDISPOSED.ToStringWithDescription();
message.Should().Be("HRESULT 0x80131622 [-2146232798]: Cannot access a disposed object.");
Expand Down

0 comments on commit 452ce51

Please sign in to comment.