Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
engine
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
engine
Commits
751da4d0
Commit
751da4d0
authored
10 months ago
by
Chris Pastl
Browse files
Options
Downloads
Patches
Plain Diff
test: add another invalid stream src to playlist
parent
356f0142
No related branches found
No related tags found
1 merge request
!40
Fix retry connect stream
Pipeline
#8030
passed
10 months ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_scheduling_scheduler_core_mock.py
+24
-21
24 additions, 21 deletions
tests/test_scheduling_scheduler_core_mock.py
with
24 additions
and
21 deletions
tests/test_scheduling_scheduler_core_mock.py
+
24
−
21
View file @
751da4d0
...
...
@@ -114,7 +114,7 @@ class TestSchedulingSchedulerCoreMock(unittest.TestCase):
start
=
now
+
current_start
,
end
=
now
+
current_end
,
show
=
Show
(
id
=
"
2
"
,
name
=
"
Stream
Show
"
,
type
=
None
,
cat
=
None
,
funding_cat
=
None
,
music_focus
=
None
id
=
"
2
"
,
name
=
"
Main
Show
"
,
type
=
None
,
cat
=
None
,
funding_cat
=
None
,
music_focus
=
None
),
episode
=
None
,
)
...
...
@@ -130,13 +130,16 @@ class TestSchedulingSchedulerCoreMock(unittest.TestCase):
)
# Playlist for timeslot 2
pl2
=
Playlist
(
"
2222
"
,
"
Stream
"
,
False
)
it2
=
PlaylistItem
(
"
http://stream.local/
"
,
current_end
-
current_start
,
100
,
None
)
pl2
.
add
(
it2
)
item_duration
=
float
(
current_end
-
current_start
)
/
2.0
i2a
=
PlaylistItem
(
"
http://stream.local/
"
,
item_duration
,
100
,
None
)
i2b
=
PlaylistItem
(
"
http://stream2.local/
"
,
item_duration
,
100
,
None
)
pl2
=
Playlist
(
"
2222
"
,
"
Streams,
"
,
False
)
pl2
.
add
(
i2a
)
pl2
.
add
(
i2b
)
# Playlist for timeslot 3
pl
3
=
Playlist
(
"
3333
"
,
"
File
"
,
Fals
e
)
it
3
=
Playlist
Item
(
"
file://3
"
,
next_duration
,
100
,
Non
e
)
it
3
=
Playlist
Item
(
"
file://2
"
,
next_duration
,
100
,
Non
e
)
pl
3
=
Playlist
(
"
3333
"
,
"
Files
"
,
Fals
e
)
pl3
.
add
(
it3
)
ts2
.
set_playlists
(
pl2
,
None
,
None
)
...
...
@@ -176,29 +179,29 @@ class TestSchedulingSchedulerCoreMock(unittest.TestCase):
# Set timetable
current_start
=
5
current_end
=
3
0
current_end
=
12
0
next_duration
=
5
# Run test
self
.
run_scheduling_test
(
current_start
,
current_end
,
next_duration
)
def
test_queue_playlist_items_timer
(
self
):
"""
Like testcase above but spawns a timer which should finish when next item starts.
"""
print
(
self
.
_testMethodName
)
#
def test_queue_playlist_items_timer(self):
#
"""
#
Like testcase above but spawns a timer which should finish when next item starts.
#
"""
#
print(self._testMethodName)
# Configure client and scheduler
self
.
client
.
stream_status
=
PlayoutStatusResponse
.
STREAM_STATUS_POLLING
self
.
scheduler
.
config
.
scheduler
.
preload_offset
=
5
#
# Configure client and scheduler
#
self.client.stream_status = PlayoutStatusResponse.STREAM_STATUS_POLLING
#
self.scheduler.config.scheduler.preload_offset = 5
# Set timetable
current_start
=
10
current_end
=
3
0
next_duration
=
5
#
# Set timetable
#
current_start = 10
#
current_end =
6
0
#
next_duration = 5
# Run test
self
.
run_scheduling_test
(
current_start
,
current_end
,
next_duration
)
#
# Run test
#
self.run_scheduling_test(current_start, current_end, next_duration)
if
__name__
==
"
__main__
"
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment