mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
Fix probe tests and add timeouts
This commit is contained in:
parent
542000601a
commit
dc30010725
3 changed files with 7 additions and 7 deletions
|
@ -37,10 +37,10 @@ public void Probe_Success_FromStream()
|
|||
{
|
||||
var output = new FFProbe();
|
||||
|
||||
using (var stream = File.OpenRead(VideoLibrary.LocalVideo.FullName))
|
||||
using (var stream = File.OpenRead(VideoLibrary.LocalVideoWebm.FullName))
|
||||
{
|
||||
var info = output.ParseVideoInfo(stream);
|
||||
Assert.AreEqual(13, info.Duration.Seconds);
|
||||
Assert.AreEqual(10, info.Duration.Seconds);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -49,11 +49,11 @@ public void Probe_Success_FromStream_Async()
|
|||
{
|
||||
var output = new FFProbe();
|
||||
|
||||
using (var stream = File.OpenRead(VideoLibrary.LocalVideo.FullName))
|
||||
using (var stream = File.OpenRead(VideoLibrary.LocalVideoWebm.FullName))
|
||||
{
|
||||
var info = output.ParseVideoInfoAsync(stream).WaitForResult();
|
||||
|
||||
Assert.AreEqual(13, info.Duration.Seconds);
|
||||
Assert.AreEqual(10, info.Duration.Seconds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -304,7 +304,7 @@ public void Video_ToMP4_Args_StreamPipe()
|
|||
ConvertFromStreamPipe(VideoType.Mp4, container);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[TestMethod, Timeout(45000)]
|
||||
public void Video_ToMP4_Args_StreamOutputPipe_Async_Failure()
|
||||
{
|
||||
Assert.ThrowsException<FFMpegException>(() =>
|
||||
|
@ -326,7 +326,7 @@ public void Video_ToMP4_Args_StreamOutputPipe_Async_Failure()
|
|||
});
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[TestMethod, Timeout(45000)]
|
||||
public void Video_ToMP4_Args_StreamOutputPipe_Failure()
|
||||
{
|
||||
Assert.ThrowsException<FFMpegException>(() =>
|
||||
|
|
|
@ -121,7 +121,7 @@ public async Task<VideoInfo> ParseVideoInfoAsync(System.IO.Stream stream)
|
|||
var task = instance.FinishedRunning();
|
||||
try
|
||||
{
|
||||
await pipeArgument.ProcessDataAsync().ConfigureAwait(false);
|
||||
await pipeArgument.ProcessDataAsync();
|
||||
pipeArgument.ClosePipe();
|
||||
}
|
||||
catch (IOException)
|
||||
|
|
Loading…
Reference in a new issue