Run code cleanup

This commit is contained in:
Malte Rosenbjerg 2025-10-16 13:32:25 +02:00
parent 4aa580e5f4
commit 671829b501
2 changed files with 6 additions and 5 deletions

View file

@ -5,6 +5,8 @@ namespace FFMpegCore.Test;
[TestClass] [TestClass]
public class FFProbeTests public class FFProbeTests
{ {
public TestContext TestContext { get; set; }
[TestMethod] [TestMethod]
public async Task Audio_FromStream_Duration() public async Task Audio_FromStream_Duration()
{ {
@ -97,7 +99,8 @@ public class FFProbeTests
[Ignore("Consistently fails on GitHub Workflow ubuntu agents")] [Ignore("Consistently fails on GitHub Workflow ubuntu agents")]
public async Task Uri_Duration() public async Task Uri_Duration()
{ {
var fileAnalysis = await FFProbe.AnalyseAsync(new Uri("https://github.com/rosenbjerg/FFMpegCore/raw/master/FFMpegCore.Test/Resources/input_3sec.webm"), cancellationToken: TestContext.CancellationToken); var fileAnalysis = await FFProbe.AnalyseAsync(new Uri("https://github.com/rosenbjerg/FFMpegCore/raw/master/FFMpegCore.Test/Resources/input_3sec.webm"),
cancellationToken: TestContext.CancellationToken);
Assert.IsNotNull(fileAnalysis); Assert.IsNotNull(fileAnalysis);
} }
@ -282,6 +285,4 @@ public class FFProbeTests
var info = FFProbe.Analyse(TestResources.Mp4Video, customArguments: "-headers \"Hello: World\""); var info = FFProbe.Analyse(TestResources.Mp4Video, customArguments: "-headers \"Hello: World\"");
Assert.AreEqual(3, info.Duration.Seconds); Assert.AreEqual(3, info.Duration.Seconds);
} }
public TestContext TestContext { get; set; }
} }

View file

@ -19,6 +19,8 @@ public class VideoTest
{ {
private const int BaseTimeoutMilliseconds = 15_000; private const int BaseTimeoutMilliseconds = 15_000;
public TestContext TestContext { get; set; }
[TestMethod] [TestMethod]
[Timeout(BaseTimeoutMilliseconds, CooperativeCancellation = true)] [Timeout(BaseTimeoutMilliseconds, CooperativeCancellation = true)]
public void Video_ToOGV() public void Video_ToOGV()
@ -1072,6 +1074,4 @@ public class VideoTest
Assert.AreEqual("h264", outputInfo.PrimaryVideoStream.CodecName); Assert.AreEqual("h264", outputInfo.PrimaryVideoStream.CodecName);
Assert.AreEqual("aac", outputInfo.PrimaryAudioStream!.CodecName); Assert.AreEqual("aac", outputInfo.PrimaryAudioStream!.CodecName);
} }
public TestContext TestContext { get; set; }
} }