mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Fix hevc test failures (#4087)
Try to fix two blackbox test:
1. TestSlow_SrtPublish_HttpTsPlay_HEVC_Basic: fixed by enlarge the wait
time from 3 seconds to 4 before run ffprobe task, which will record the
stream by ffmpeg first.
2 TestSlow_SrtPublish_HlsPlay_HEVC_Basic: fixed by wait 16 seconds
before run ffprobe task.
About the 2 case: it seems ridiculous to add 16 seconds delay before run
ffprobe task.
> So, I start #4088 to check the github action workflow process, I start
this branch from a very earlier version `6.0.113
(srs/core/srs_core_version6.hpp)`, what I found it that, inside `SRS
blackbox-test`, the srs version `6.0.128`, the latest version, was
printed. That's really wired.
I confirmed this is not the SRS source code's problem, check
2621802555
the srs code 6.0.113 was checkout and running actions based on them,
still met same problem.
---------
Co-authored-by: winlin <winlinvip@gmail.com>
This commit is contained in:
parent
9dba99a1cc
commit
908c2f2a30
1 changed files with 16 additions and 7 deletions
23
trunk/3rdparty/srs-bench/blackbox/hevc_test.go
vendored
23
trunk/3rdparty/srs-bench/blackbox/hevc_test.go
vendored
|
@ -900,6 +900,14 @@ func TestSlow_SrtPublish_HttpTsPlay_HEVC_Basic(t *testing.T) {
|
|||
r1 = ffmpeg.Run(ctx, cancel)
|
||||
}()
|
||||
|
||||
// Should wait for TS to generate the contents.
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
r2 = fmt.Errorf("timeout")
|
||||
return
|
||||
case <-time.After(5 * time.Second):
|
||||
}
|
||||
|
||||
// Start FFprobe to detect and verify stream.
|
||||
duration := time.Duration(*srsFFprobeDuration) * time.Millisecond
|
||||
ffprobe := NewFFprobe(func(v *ffprobeClient) {
|
||||
|
@ -912,9 +920,6 @@ func TestSlow_SrtPublish_HttpTsPlay_HEVC_Basic(t *testing.T) {
|
|||
defer wg.Done()
|
||||
<-svr.ReadyCtx().Done()
|
||||
|
||||
// wait for ffmpeg
|
||||
time.Sleep(3 * time.Second)
|
||||
|
||||
r2 = ffprobe.Run(ctx, cancel)
|
||||
}()
|
||||
|
||||
|
@ -949,7 +954,6 @@ func TestSlow_SrtPublish_HlsPlay_HEVC_Basic(t *testing.T) {
|
|||
// Setup the max timeout for this case.
|
||||
ctx, cancel := context.WithTimeout(logger.WithContext(context.Background()), time.Duration(*srsTimeout)*time.Millisecond)
|
||||
defer cancel()
|
||||
|
||||
// Check a set of errors.
|
||||
var r0, r1, r2, r3, r4 error
|
||||
defer func(ctx context.Context) {
|
||||
|
@ -995,12 +999,17 @@ func TestSlow_SrtPublish_HlsPlay_HEVC_Basic(t *testing.T) {
|
|||
defer wg.Done()
|
||||
<-svr.ReadyCtx().Done()
|
||||
|
||||
// wait for ffmpeg
|
||||
time.Sleep(3 * time.Second)
|
||||
|
||||
r1 = ffmpeg.Run(ctx, cancel)
|
||||
}()
|
||||
|
||||
// Should wait for HLS to generate the ts files.
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
r2 = fmt.Errorf("timeout")
|
||||
return
|
||||
case <-time.After(20 * time.Second):
|
||||
}
|
||||
|
||||
// Start FFprobe to detect and verify stream.
|
||||
duration := time.Duration(*srsFFprobeDuration) * time.Millisecond
|
||||
ffprobe := NewFFprobe(func(v *ffprobeClient) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue