Fix outerloop tests in System.Formats.Tar (#89172)
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Wed, 19 Jul 2023 12:01:05 +0000 (14:01 +0200)
committerGitHub <noreply@github.com>
Wed, 19 Jul 2023 12:01:05 +0000 (14:01 +0200)
The change from https://github.com/dotnet/runtime/pull/88280 caused an issue when discovering the test:

```
System.InvalidOperationException : An appropriate member 'ManualTestsEnabled' could not be found. The conditional method needs to be a static method, property, or field on the type System.Formats.Tar.Tests.ManualTestsAsync or any ancestor, of any visibility, accepting zero arguments, and having a return type of Boolean.
```

src/libraries/System.Formats.Tar/tests/Manual/ManualTestsAsync.cs

index 5262c71..445502d 100644 (file)
@@ -16,7 +16,7 @@ public class ManualTestsAsync : TarTestsBase
         // Fixes error xUnit1015: MemberData needs to be in the same class
         => ManualTests.WriteEntry_LongFileSize_TheoryData();
 
-    [ConditionalTheory(nameof(ManualTests.ManualTestsEnabled))]
+    [ConditionalTheory(typeof(ManualTests), nameof(ManualTests.ManualTestsEnabled))]
     [MemberData(nameof(WriteEntry_LongFileSize_TheoryDataAsync))]
     [SkipOnPlatform(TestPlatforms.iOS | TestPlatforms.tvOS | TestPlatforms.Android | TestPlatforms.Browser, "Needs too much disk space.")]
     public async Task WriteEntry_LongFileSizeAsync(TarEntryFormat entryFormat, long size, bool unseekableStream)