mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
SRS5: Test: Run fast and slow blackbox tests seperately.
PICK 95b534ff10
This commit is contained in:
parent
57d205d5a0
commit
b104826a96
5 changed files with 19 additions and 17 deletions
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
|
@ -197,7 +197,9 @@ jobs:
|
||||||
- name: Run SRS blackbox-test
|
- name: Run SRS blackbox-test
|
||||||
run: |
|
run: |
|
||||||
docker run --rm -w /srs/trunk/3rdparty/srs-bench srs:test \
|
docker run --rm -w /srs/trunk/3rdparty/srs-bench srs:test \
|
||||||
./objs/srs_blackbox_test -test.v -test.parallel 64
|
./objs/srs_blackbox_test -test.v -test.run '^TestFast' -test.parallel 64
|
||||||
|
docker run --rm -w /srs/trunk/3rdparty/srs-bench srs:test \
|
||||||
|
./objs/srs_blackbox_test -test.v -test.run '^TestSlow' -test.parallel 2
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
|
|
12
trunk/3rdparty/srs-bench/blackbox/hevc_test.go
vendored
12
trunk/3rdparty/srs-bench/blackbox/hevc_test.go
vendored
|
@ -34,7 +34,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRtmpPublish_RtmpPlay_HEVC_Basic(t *testing.T) {
|
func TestSlow_RtmpPublish_RtmpPlay_HEVC_Basic(t *testing.T) {
|
||||||
// This case is run in parallel.
|
// This case is run in parallel.
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ func TestRtmpPublish_RtmpPlay_HEVC_Basic(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRtmpPublish_HttpFlvPlay_HEVC_Basic(t *testing.T) {
|
func TestSlow_RtmpPublish_HttpFlvPlay_HEVC_Basic(t *testing.T) {
|
||||||
// This case is run in parallel.
|
// This case is run in parallel.
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
@ -221,7 +221,7 @@ func TestRtmpPublish_HttpFlvPlay_HEVC_Basic(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRtmpPublish_HttpTsPlay_HEVC_Basic(t *testing.T) {
|
func TestSlow_RtmpPublish_HttpTsPlay_HEVC_Basic(t *testing.T) {
|
||||||
// This case is run in parallel.
|
// This case is run in parallel.
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
@ -317,7 +317,7 @@ func TestRtmpPublish_HttpTsPlay_HEVC_Basic(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRtmpPublish_HlsPlay_HEVC_Basic(t *testing.T) {
|
func TestSlow_RtmpPublish_HlsPlay_HEVC_Basic(t *testing.T) {
|
||||||
// This case is run in parallel.
|
// This case is run in parallel.
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
@ -375,11 +375,11 @@ func TestRtmpPublish_HlsPlay_HEVC_Basic(t *testing.T) {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
// Start FFprobe to detect and verify stream.
|
// Start FFprobe to detect and verify stream.
|
||||||
duration := time.Duration(*srsFFprobeDuration) * time.Millisecond
|
duration := time.Duration(*srsFFprobeDuration) * time.Millisecond * 2
|
||||||
ffprobe := NewFFprobe(func(v *ffprobeClient) {
|
ffprobe := NewFFprobe(func(v *ffprobeClient) {
|
||||||
v.dvrFile = path.Join(svr.WorkDir(), "objs", fmt.Sprintf("srs-ffprobe-%v.ts", streamID))
|
v.dvrFile = path.Join(svr.WorkDir(), "objs", fmt.Sprintf("srs-ffprobe-%v.ts", streamID))
|
||||||
v.streamURL = fmt.Sprintf("http://localhost:%v/live/%v.m3u8", svr.HTTPPort(), streamID)
|
v.streamURL = fmt.Sprintf("http://localhost:%v/live/%v.m3u8", svr.HTTPPort(), streamID)
|
||||||
v.duration, v.timeout = duration, time.Duration(*srsFFprobeTimeout)*time.Millisecond
|
v.duration, v.timeout = duration, time.Duration(*srsFFprobeTimeout)*time.Millisecond * 2
|
||||||
})
|
})
|
||||||
wg.Add(1)
|
wg.Add(1)
|
||||||
go func() {
|
go func() {
|
||||||
|
|
|
@ -33,7 +33,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRtmpPublish_HlsPlay_Basic(t *testing.T) {
|
func TestFast_RtmpPublish_HlsPlay_Basic(t *testing.T) {
|
||||||
// This case is run in parallel.
|
// This case is run in parallel.
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
|
10
trunk/3rdparty/srs-bench/blackbox/mp3_test.go
vendored
10
trunk/3rdparty/srs-bench/blackbox/mp3_test.go
vendored
|
@ -33,7 +33,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRtmpPublish_RtmpPlay_CodecMP3_Basic(t *testing.T) {
|
func TestFast_RtmpPublish_RtmpPlay_CodecMP3_Basic(t *testing.T) {
|
||||||
// This case is run in parallel.
|
// This case is run in parallel.
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ func TestRtmpPublish_RtmpPlay_CodecMP3_Basic(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRtmpPublish_HttpFlvPlay_CodecMP3_Basic(t *testing.T) {
|
func TestFast_RtmpPublish_HttpFlvPlay_CodecMP3_Basic(t *testing.T) {
|
||||||
// This case is run in parallel.
|
// This case is run in parallel.
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ func TestRtmpPublish_HttpFlvPlay_CodecMP3_Basic(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRtmpPublish_HttpMp3Play_CodecMP3_Basic(t *testing.T) {
|
func TestFast_RtmpPublish_HttpMp3Play_CodecMP3_Basic(t *testing.T) {
|
||||||
// This case is run in parallel.
|
// This case is run in parallel.
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
@ -296,7 +296,7 @@ func TestRtmpPublish_HttpMp3Play_CodecMP3_Basic(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRtmpPublish_HttpTsPlay_CodecMP3_Basic(t *testing.T) {
|
func TestFast_RtmpPublish_HttpTsPlay_CodecMP3_Basic(t *testing.T) {
|
||||||
// This case is run in parallel.
|
// This case is run in parallel.
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
@ -384,7 +384,7 @@ func TestRtmpPublish_HttpTsPlay_CodecMP3_Basic(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRtmpPublish_HlsPlay_CodecMP3_Basic(t *testing.T) {
|
func TestFast_RtmpPublish_HlsPlay_CodecMP3_Basic(t *testing.T) {
|
||||||
// This case is run in parallel.
|
// This case is run in parallel.
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRtmpPublish_RtmpPlay_Basic(t *testing.T) {
|
func TestFast_RtmpPublish_RtmpPlay_Basic(t *testing.T) {
|
||||||
// This case is run in parallel.
|
// This case is run in parallel.
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ func TestRtmpPublish_RtmpPlay_Basic(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRtmpPublish_HttpFlvPlay_Basic(t *testing.T) {
|
func TestFast_RtmpPublish_HttpFlvPlay_Basic(t *testing.T) {
|
||||||
// This case is run in parallel.
|
// This case is run in parallel.
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ func TestRtmpPublish_HttpFlvPlay_Basic(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRtmpPublish_RtmpPlay_ChunkSize128(t *testing.T) {
|
func TestFast_RtmpPublish_RtmpPlay_ChunkSize128(t *testing.T) {
|
||||||
// This case is run in parallel.
|
// This case is run in parallel.
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
@ -274,7 +274,7 @@ func TestRtmpPublish_RtmpPlay_ChunkSize128(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestRtmpPublish_RtmpPlay_EnableATC(t *testing.T) {
|
func TestFast_RtmpPublish_RtmpPlay_EnableATC(t *testing.T) {
|
||||||
// This case is run in parallel.
|
// This case is run in parallel.
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue