mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
refactor: Centralized test timeout duration
Changes can be made in a single place if neeeded
This commit is contained in:
parent
7f17d68a52
commit
72c76c20f0
1 changed files with 43 additions and 41 deletions
|
@ -15,7 +15,9 @@ namespace FFMpegCore.Test
|
||||||
[TestClass]
|
[TestClass]
|
||||||
public class VideoTest
|
public class VideoTest
|
||||||
{
|
{
|
||||||
[TestMethod, Timeout(10000)]
|
private const int BaseTimeoutMilliseconds = 10_000;
|
||||||
|
|
||||||
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void Video_ToOGV()
|
public void Video_ToOGV()
|
||||||
{
|
{
|
||||||
using var outputFile = new TemporaryFile($"out{VideoType.Ogv.Extension}");
|
using var outputFile = new TemporaryFile($"out{VideoType.Ogv.Extension}");
|
||||||
|
@ -27,7 +29,7 @@ public void Video_ToOGV()
|
||||||
Assert.IsTrue(success);
|
Assert.IsTrue(success);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void Video_ToMP4()
|
public void Video_ToMP4()
|
||||||
{
|
{
|
||||||
using var outputFile = new TemporaryFile($"out{VideoType.Mp4.Extension}");
|
using var outputFile = new TemporaryFile($"out{VideoType.Mp4.Extension}");
|
||||||
|
@ -39,7 +41,7 @@ public void Video_ToMP4()
|
||||||
Assert.IsTrue(success);
|
Assert.IsTrue(success);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void Video_ToMP4_YUV444p()
|
public void Video_ToMP4_YUV444p()
|
||||||
{
|
{
|
||||||
using var outputFile = new TemporaryFile($"out{VideoType.Mp4.Extension}");
|
using var outputFile = new TemporaryFile($"out{VideoType.Mp4.Extension}");
|
||||||
|
@ -55,7 +57,7 @@ public void Video_ToMP4_YUV444p()
|
||||||
Assert.IsTrue(analysis.VideoStreams.First().PixelFormat == "yuv444p");
|
Assert.IsTrue(analysis.VideoStreams.First().PixelFormat == "yuv444p");
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void Video_ToMP4_Args()
|
public void Video_ToMP4_Args()
|
||||||
{
|
{
|
||||||
using var outputFile = new TemporaryFile($"out{VideoType.Mp4.Extension}");
|
using var outputFile = new TemporaryFile($"out{VideoType.Mp4.Extension}");
|
||||||
|
@ -68,7 +70,7 @@ public void Video_ToMP4_Args()
|
||||||
Assert.IsTrue(success);
|
Assert.IsTrue(success);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void Video_ToH265_MKV_Args()
|
public void Video_ToH265_MKV_Args()
|
||||||
{
|
{
|
||||||
using var outputFile = new TemporaryFile($"out.mkv");
|
using var outputFile = new TemporaryFile($"out.mkv");
|
||||||
|
@ -82,7 +84,7 @@ public void Video_ToH265_MKV_Args()
|
||||||
}
|
}
|
||||||
|
|
||||||
[SupportedOSPlatform("windows")]
|
[SupportedOSPlatform("windows")]
|
||||||
[WindowsOnlyDataTestMethod, Timeout(10000)]
|
[WindowsOnlyDataTestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
[DataRow(SKColorType.Rgb565)]
|
[DataRow(SKColorType.Rgb565)]
|
||||||
[DataRow(SKColorType.Bgra8888)]
|
[DataRow(SKColorType.Bgra8888)]
|
||||||
public void Video_ToMP4_Args_Pipe(SKColorType pixelFormat)
|
public void Video_ToMP4_Args_Pipe(SKColorType pixelFormat)
|
||||||
|
@ -99,7 +101,7 @@ public void Video_ToMP4_Args_Pipe(SKColorType pixelFormat)
|
||||||
}
|
}
|
||||||
|
|
||||||
[SupportedOSPlatform("windows")]
|
[SupportedOSPlatform("windows")]
|
||||||
[WindowsOnlyTestMethod, Timeout(10000)]
|
[WindowsOnlyTestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void Video_ToMP4_Args_Pipe_DifferentImageSizes()
|
public void Video_ToMP4_Args_Pipe_DifferentImageSizes()
|
||||||
{
|
{
|
||||||
using var outputFile = new TemporaryFile($"out{VideoType.Mp4.Extension}");
|
using var outputFile = new TemporaryFile($"out{VideoType.Mp4.Extension}");
|
||||||
|
@ -119,7 +121,7 @@ public void Video_ToMP4_Args_Pipe_DifferentImageSizes()
|
||||||
}
|
}
|
||||||
|
|
||||||
[SupportedOSPlatform("windows")]
|
[SupportedOSPlatform("windows")]
|
||||||
[WindowsOnlyTestMethod, Timeout(10000)]
|
[WindowsOnlyTestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public async Task Video_ToMP4_Args_Pipe_DifferentImageSizes_Async()
|
public async Task Video_ToMP4_Args_Pipe_DifferentImageSizes_Async()
|
||||||
{
|
{
|
||||||
using var outputFile = new TemporaryFile($"out{VideoType.Mp4.Extension}");
|
using var outputFile = new TemporaryFile($"out{VideoType.Mp4.Extension}");
|
||||||
|
@ -139,7 +141,7 @@ public async Task Video_ToMP4_Args_Pipe_DifferentImageSizes_Async()
|
||||||
}
|
}
|
||||||
|
|
||||||
[SupportedOSPlatform("windows")]
|
[SupportedOSPlatform("windows")]
|
||||||
[WindowsOnlyTestMethod, Timeout(10000)]
|
[WindowsOnlyTestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void Video_ToMP4_Args_Pipe_DifferentPixelFormats()
|
public void Video_ToMP4_Args_Pipe_DifferentPixelFormats()
|
||||||
{
|
{
|
||||||
using var outputFile = new TemporaryFile($"out{VideoType.Mp4.Extension}");
|
using var outputFile = new TemporaryFile($"out{VideoType.Mp4.Extension}");
|
||||||
|
@ -159,7 +161,7 @@ public void Video_ToMP4_Args_Pipe_DifferentPixelFormats()
|
||||||
}
|
}
|
||||||
|
|
||||||
[SupportedOSPlatform("windows")]
|
[SupportedOSPlatform("windows")]
|
||||||
[WindowsOnlyTestMethod, Timeout(10000)]
|
[WindowsOnlyTestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public async Task Video_ToMP4_Args_Pipe_DifferentPixelFormats_Async()
|
public async Task Video_ToMP4_Args_Pipe_DifferentPixelFormats_Async()
|
||||||
{
|
{
|
||||||
using var outputFile = new TemporaryFile($"out{VideoType.Mp4.Extension}");
|
using var outputFile = new TemporaryFile($"out{VideoType.Mp4.Extension}");
|
||||||
|
@ -178,7 +180,7 @@ public async Task Video_ToMP4_Args_Pipe_DifferentPixelFormats_Async()
|
||||||
.ProcessAsynchronously());
|
.ProcessAsynchronously());
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void Video_ToMP4_Args_StreamPipe()
|
public void Video_ToMP4_Args_StreamPipe()
|
||||||
{
|
{
|
||||||
using var input = File.OpenRead(TestResources.WebmVideo);
|
using var input = File.OpenRead(TestResources.WebmVideo);
|
||||||
|
@ -192,7 +194,7 @@ public void Video_ToMP4_Args_StreamPipe()
|
||||||
Assert.IsTrue(success);
|
Assert.IsTrue(success);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public async Task Video_ToMP4_Args_StreamOutputPipe_Async_Failure()
|
public async Task Video_ToMP4_Args_StreamOutputPipe_Async_Failure()
|
||||||
{
|
{
|
||||||
await Assert.ThrowsExceptionAsync<FFMpegException>(async () =>
|
await Assert.ThrowsExceptionAsync<FFMpegException>(async () =>
|
||||||
|
@ -206,7 +208,7 @@ await FFMpegArguments
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void Video_StreamFile_OutputToMemoryStream()
|
public void Video_StreamFile_OutputToMemoryStream()
|
||||||
{
|
{
|
||||||
var output = new MemoryStream();
|
var output = new MemoryStream();
|
||||||
|
@ -223,7 +225,7 @@ public void Video_StreamFile_OutputToMemoryStream()
|
||||||
Console.WriteLine(result.Duration);
|
Console.WriteLine(result.Duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void Video_ToMP4_Args_StreamOutputPipe_Failure()
|
public void Video_ToMP4_Args_StreamOutputPipe_Failure()
|
||||||
{
|
{
|
||||||
Assert.ThrowsException<FFMpegException>(() =>
|
Assert.ThrowsException<FFMpegException>(() =>
|
||||||
|
@ -237,7 +239,7 @@ public void Video_ToMP4_Args_StreamOutputPipe_Failure()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public async Task Video_ToMP4_Args_StreamOutputPipe_Async()
|
public async Task Video_ToMP4_Args_StreamOutputPipe_Async()
|
||||||
{
|
{
|
||||||
await using var ms = new MemoryStream();
|
await using var ms = new MemoryStream();
|
||||||
|
@ -250,7 +252,7 @@ await FFMpegArguments
|
||||||
.ProcessAsynchronously();
|
.ProcessAsynchronously();
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public async Task TestDuplicateRun()
|
public async Task TestDuplicateRun()
|
||||||
{
|
{
|
||||||
FFMpegArguments
|
FFMpegArguments
|
||||||
|
@ -266,7 +268,7 @@ await FFMpegArguments
|
||||||
File.Delete("temporary.mp4");
|
File.Delete("temporary.mp4");
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void TranscodeToMemoryStream_Success()
|
public void TranscodeToMemoryStream_Success()
|
||||||
{
|
{
|
||||||
using var output = new MemoryStream();
|
using var output = new MemoryStream();
|
||||||
|
@ -284,7 +286,7 @@ public void TranscodeToMemoryStream_Success()
|
||||||
Assert.AreEqual(inputAnalysis.Duration.TotalSeconds, outputAnalysis.Duration.TotalSeconds, 0.3);
|
Assert.AreEqual(inputAnalysis.Duration.TotalSeconds, outputAnalysis.Duration.TotalSeconds, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void Video_ToTS()
|
public void Video_ToTS()
|
||||||
{
|
{
|
||||||
using var outputFile = new TemporaryFile($"out{VideoType.MpegTs.Extension}");
|
using var outputFile = new TemporaryFile($"out{VideoType.MpegTs.Extension}");
|
||||||
|
@ -296,7 +298,7 @@ public void Video_ToTS()
|
||||||
Assert.IsTrue(success);
|
Assert.IsTrue(success);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void Video_ToTS_Args()
|
public void Video_ToTS_Args()
|
||||||
{
|
{
|
||||||
using var outputFile = new TemporaryFile($"out{VideoType.MpegTs.Extension}");
|
using var outputFile = new TemporaryFile($"out{VideoType.MpegTs.Extension}");
|
||||||
|
@ -312,7 +314,7 @@ public void Video_ToTS_Args()
|
||||||
}
|
}
|
||||||
|
|
||||||
[SupportedOSPlatform("windows")]
|
[SupportedOSPlatform("windows")]
|
||||||
[WindowsOnlyDataTestMethod, Timeout(10000)]
|
[WindowsOnlyDataTestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
[DataRow(SKColorType.Rgb565)]
|
[DataRow(SKColorType.Rgb565)]
|
||||||
[DataRow(SKColorType.Bgra8888)]
|
[DataRow(SKColorType.Bgra8888)]
|
||||||
public async Task Video_ToTS_Args_Pipe(SKColorType pixelFormat)
|
public async Task Video_ToTS_Args_Pipe(SKColorType pixelFormat)
|
||||||
|
@ -331,7 +333,7 @@ public async Task Video_ToTS_Args_Pipe(SKColorType pixelFormat)
|
||||||
Assert.AreEqual(VideoType.Ts.Name, analysis.Format.FormatName);
|
Assert.AreEqual(VideoType.Ts.Name, analysis.Format.FormatName);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public async Task Video_ToOGV_Resize()
|
public async Task Video_ToOGV_Resize()
|
||||||
{
|
{
|
||||||
using var outputFile = new TemporaryFile($"out{VideoType.Ogv.Extension}");
|
using var outputFile = new TemporaryFile($"out{VideoType.Ogv.Extension}");
|
||||||
|
@ -345,7 +347,7 @@ public async Task Video_ToOGV_Resize()
|
||||||
}
|
}
|
||||||
|
|
||||||
[SupportedOSPlatform("windows")]
|
[SupportedOSPlatform("windows")]
|
||||||
[WindowsOnlyDataTestMethod, Timeout(10000)]
|
[WindowsOnlyDataTestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
[DataRow(SKColorType.Rgb565)]
|
[DataRow(SKColorType.Rgb565)]
|
||||||
[DataRow(SKColorType.Bgra8888)]
|
[DataRow(SKColorType.Bgra8888)]
|
||||||
public void RawVideoPipeSource_Ogv_Scale(SKColorType pixelFormat)
|
public void RawVideoPipeSource_Ogv_Scale(SKColorType pixelFormat)
|
||||||
|
@ -365,7 +367,7 @@ public void RawVideoPipeSource_Ogv_Scale(SKColorType pixelFormat)
|
||||||
Assert.AreEqual((int)VideoSize.Ed, analysis.PrimaryVideoStream!.Width);
|
Assert.AreEqual((int)VideoSize.Ed, analysis.PrimaryVideoStream!.Width);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void Scale_Mp4_Multithreaded()
|
public void Scale_Mp4_Multithreaded()
|
||||||
{
|
{
|
||||||
using var outputFile = new TemporaryFile($"out{VideoType.Mp4.Extension}");
|
using var outputFile = new TemporaryFile($"out{VideoType.Mp4.Extension}");
|
||||||
|
@ -380,7 +382,7 @@ public void Scale_Mp4_Multithreaded()
|
||||||
}
|
}
|
||||||
|
|
||||||
[SupportedOSPlatform("windows")]
|
[SupportedOSPlatform("windows")]
|
||||||
[WindowsOnlyDataTestMethod, Timeout(10000)]
|
[WindowsOnlyDataTestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
[DataRow(SKColorType.Rgb565)]
|
[DataRow(SKColorType.Rgb565)]
|
||||||
[DataRow(SKColorType.Bgra8888)]
|
[DataRow(SKColorType.Bgra8888)]
|
||||||
// [DataRow(PixelFormat.Format48bppRgb)]
|
// [DataRow(PixelFormat.Format48bppRgb)]
|
||||||
|
@ -398,7 +400,7 @@ public void Video_ToMP4_Resize_Args_Pipe(SKColorType pixelFormat)
|
||||||
}
|
}
|
||||||
|
|
||||||
[SupportedOSPlatform("windows")]
|
[SupportedOSPlatform("windows")]
|
||||||
[WindowsOnlyTestMethod, Timeout(10000)]
|
[WindowsOnlyTestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void Video_Snapshot_InMemory()
|
public void Video_Snapshot_InMemory()
|
||||||
{
|
{
|
||||||
using var bitmap = FFMpegImage.Snapshot(TestResources.Mp4Video);
|
using var bitmap = FFMpegImage.Snapshot(TestResources.Mp4Video);
|
||||||
|
@ -409,7 +411,7 @@ public void Video_Snapshot_InMemory()
|
||||||
Assert.AreEqual(bitmap.ColorType, SKColorType.Bgra8888);
|
Assert.AreEqual(bitmap.ColorType, SKColorType.Bgra8888);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void Video_Snapshot_PersistSnapshot()
|
public void Video_Snapshot_PersistSnapshot()
|
||||||
{
|
{
|
||||||
var outputPath = new TemporaryFile("out.png");
|
var outputPath = new TemporaryFile("out.png");
|
||||||
|
@ -423,7 +425,7 @@ public void Video_Snapshot_PersistSnapshot()
|
||||||
Assert.AreEqual("png", analysis.PrimaryVideoStream!.CodecName);
|
Assert.AreEqual("png", analysis.PrimaryVideoStream!.CodecName);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void Video_Join()
|
public void Video_Join()
|
||||||
{
|
{
|
||||||
var inputCopy = new TemporaryFile("copy-input.mp4");
|
var inputCopy = new TemporaryFile("copy-input.mp4");
|
||||||
|
@ -445,7 +447,7 @@ public void Video_Join()
|
||||||
Assert.AreEqual(input.PrimaryVideoStream.Width, result.PrimaryVideoStream.Width);
|
Assert.AreEqual(input.PrimaryVideoStream.Width, result.PrimaryVideoStream.Width);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(20000)]
|
[TestMethod, Timeout(2 * BaseTimeoutMilliseconds)]
|
||||||
public void Video_Join_Image_Sequence()
|
public void Video_Join_Image_Sequence()
|
||||||
{
|
{
|
||||||
var imageSet = new List<string>();
|
var imageSet = new List<string>();
|
||||||
|
@ -470,7 +472,7 @@ public void Video_Join_Image_Sequence()
|
||||||
Assert.AreEqual(imageAnalysis.PrimaryVideoStream!.Height, result.PrimaryVideoStream.Height);
|
Assert.AreEqual(imageAnalysis.PrimaryVideoStream!.Height, result.PrimaryVideoStream.Height);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void Video_With_Only_Audio_Should_Extract_Metadata()
|
public void Video_With_Only_Audio_Should_Extract_Metadata()
|
||||||
{
|
{
|
||||||
var video = FFProbe.Analyse(TestResources.Mp4WithoutVideo);
|
var video = FFProbe.Analyse(TestResources.Mp4WithoutVideo);
|
||||||
|
@ -479,7 +481,7 @@ public void Video_With_Only_Audio_Should_Extract_Metadata()
|
||||||
Assert.AreEqual(10, video.Duration.TotalSeconds, 0.5);
|
Assert.AreEqual(10, video.Duration.TotalSeconds, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void Video_Duration()
|
public void Video_Duration()
|
||||||
{
|
{
|
||||||
var video = FFProbe.Analyse(TestResources.Mp4Video);
|
var video = FFProbe.Analyse(TestResources.Mp4Video);
|
||||||
|
@ -499,7 +501,7 @@ public void Video_Duration()
|
||||||
Assert.AreEqual(video.Duration.Seconds - 2, outputVideo.Duration.Seconds);
|
Assert.AreEqual(video.Duration.Seconds - 2, outputVideo.Duration.Seconds);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void Video_UpdatesProgress()
|
public void Video_UpdatesProgress()
|
||||||
{
|
{
|
||||||
var outputFile = new TemporaryFile("out.mp4");
|
var outputFile = new TemporaryFile("out.mp4");
|
||||||
|
@ -540,7 +542,7 @@ void OnTimeProgess(TimeSpan time)
|
||||||
Assert.AreNotEqual(analysis.Duration, timeDone);
|
Assert.AreNotEqual(analysis.Duration, timeDone);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void Video_OutputsData()
|
public void Video_OutputsData()
|
||||||
{
|
{
|
||||||
var outputFile = new TemporaryFile("out.mp4");
|
var outputFile = new TemporaryFile("out.mp4");
|
||||||
|
@ -562,7 +564,7 @@ public void Video_OutputsData()
|
||||||
}
|
}
|
||||||
|
|
||||||
[SupportedOSPlatform("windows")]
|
[SupportedOSPlatform("windows")]
|
||||||
[WindowsOnlyTestMethod, Timeout(10000)]
|
[WindowsOnlyTestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void Video_TranscodeInMemory()
|
public void Video_TranscodeInMemory()
|
||||||
{
|
{
|
||||||
using var resStream = new MemoryStream();
|
using var resStream = new MemoryStream();
|
||||||
|
@ -582,7 +584,7 @@ public void Video_TranscodeInMemory()
|
||||||
Assert.AreEqual(vi.PrimaryVideoStream.Height, 128);
|
Assert.AreEqual(vi.PrimaryVideoStream.Height, 128);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(20000)]
|
[TestMethod, Timeout(2 * BaseTimeoutMilliseconds)]
|
||||||
public void Video_TranscodeToMemory()
|
public void Video_TranscodeToMemory()
|
||||||
{
|
{
|
||||||
using var memoryStream = new MemoryStream();
|
using var memoryStream = new MemoryStream();
|
||||||
|
@ -600,7 +602,7 @@ public void Video_TranscodeToMemory()
|
||||||
Assert.AreEqual(vi.PrimaryVideoStream.Height, 360);
|
Assert.AreEqual(vi.PrimaryVideoStream.Height, 360);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public async Task Video_Cancel_Async()
|
public async Task Video_Cancel_Async()
|
||||||
{
|
{
|
||||||
var outputFile = new TemporaryFile("out.mp4");
|
var outputFile = new TemporaryFile("out.mp4");
|
||||||
|
@ -624,7 +626,7 @@ public async Task Video_Cancel_Async()
|
||||||
Assert.IsFalse(result);
|
Assert.IsFalse(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void Video_Cancel()
|
public void Video_Cancel()
|
||||||
{
|
{
|
||||||
var outputFile = new TemporaryFile("out.mp4");
|
var outputFile = new TemporaryFile("out.mp4");
|
||||||
|
@ -645,7 +647,7 @@ public void Video_Cancel()
|
||||||
Assert.IsFalse(result);
|
Assert.IsFalse(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public async Task Video_Cancel_Async_With_Timeout()
|
public async Task Video_Cancel_Async_With_Timeout()
|
||||||
{
|
{
|
||||||
var outputFile = new TemporaryFile("out.mp4");
|
var outputFile = new TemporaryFile("out.mp4");
|
||||||
|
@ -675,7 +677,7 @@ public async Task Video_Cancel_Async_With_Timeout()
|
||||||
Assert.AreEqual("aac", outputInfo.PrimaryAudioStream!.CodecName);
|
Assert.AreEqual("aac", outputInfo.PrimaryAudioStream!.CodecName);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public async Task Video_Cancel_CancellationToken_Async()
|
public async Task Video_Cancel_CancellationToken_Async()
|
||||||
{
|
{
|
||||||
var outputFile = new TemporaryFile("out.mp4");
|
var outputFile = new TemporaryFile("out.mp4");
|
||||||
|
@ -700,7 +702,7 @@ public async Task Video_Cancel_CancellationToken_Async()
|
||||||
Assert.IsFalse(result);
|
Assert.IsFalse(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public async Task Video_Cancel_CancellationToken_Async_Throws()
|
public async Task Video_Cancel_CancellationToken_Async_Throws()
|
||||||
{
|
{
|
||||||
var outputFile = new TemporaryFile("out.mp4");
|
var outputFile = new TemporaryFile("out.mp4");
|
||||||
|
@ -723,7 +725,7 @@ public async Task Video_Cancel_CancellationToken_Async_Throws()
|
||||||
await Assert.ThrowsExceptionAsync<OperationCanceledException>(() => task);
|
await Assert.ThrowsExceptionAsync<OperationCanceledException>(() => task);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public void Video_Cancel_CancellationToken_Throws()
|
public void Video_Cancel_CancellationToken_Throws()
|
||||||
{
|
{
|
||||||
var outputFile = new TemporaryFile("out.mp4");
|
var outputFile = new TemporaryFile("out.mp4");
|
||||||
|
@ -745,7 +747,7 @@ public void Video_Cancel_CancellationToken_Throws()
|
||||||
Assert.ThrowsException<OperationCanceledException>(() => task.ProcessSynchronously());
|
Assert.ThrowsException<OperationCanceledException>(() => task.ProcessSynchronously());
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod, Timeout(10000)]
|
[TestMethod, Timeout(BaseTimeoutMilliseconds)]
|
||||||
public async Task Video_Cancel_CancellationToken_Async_With_Timeout()
|
public async Task Video_Cancel_CancellationToken_Async_With_Timeout()
|
||||||
{
|
{
|
||||||
var outputFile = new TemporaryFile("out.mp4");
|
var outputFile = new TemporaryFile("out.mp4");
|
||||||
|
|
Loading…
Reference in a new issue