Skip to content

Commit

Permalink
Make error tests sequential
Browse files Browse the repository at this point in the history
There are threading issues with Marshal.GetExceptionForHR.
  • Loading branch information
JeremyKuhne committed Nov 15, 2023
1 parent 7b8eb9e commit f472eda
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/thirtytwo_tests/Support/ErrorTestCollection.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright (c) Jeremy W. Kuhne. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Runtime.InteropServices;

namespace Windows.Support;

/// <summary>
/// There are threading issues with <see cref="Marshal.GetExceptionForHR(int)"/>
/// </summary>
[CollectionDefinition(nameof(ErrorTestCollection), DisableParallelization = true)]
public class ErrorTestCollection
{
}
1 change: 1 addition & 0 deletions src/thirtytwo_tests/Support/ErrorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace Windows.Support;

[Collection(nameof(ErrorTestCollection))]
public class ErrorTests
{
[Fact]
Expand Down

0 comments on commit f472eda

Please sign in to comment.