Skip to content

Commit 7a340bf

Browse files
ci: try to stop channel again before deleting it in the test (#36)
* Try to stop channel again before deleting it in the test. * docs(samples): try to stop channel again before deleting it in the test. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent aa93833 commit 7a340bf

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

video/livestream/channel_test.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ def test_channel_operations(capsys: pytest.fixture) -> None:
6969
delete_channel.delete_channel(
7070
project_name, location, next_channel_id
7171
)
72+
except FailedPrecondition as e:
73+
print(f"Ignoring FailedPrecondition, try to stop channel: {e}")
74+
try:
75+
stop_channel.stop_channel(
76+
project_name, location, next_channel_id
77+
)
78+
except FailedPrecondition as e:
79+
print(f"Ignoring FailedPrecondition, details: {e}")
7280
except NotFound as e:
7381
print(f"Ignoring NotFound, details: {e}")
7482
except NotFound as e:

video/livestream/input_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import os
1616
import uuid
1717

18-
from google.api_core.exceptions import NotFound
18+
from google.api_core.exceptions import FailedPrecondition, NotFound
1919
import pytest
2020

2121
import create_input
@@ -38,6 +38,8 @@ def test_input_operations(capsys: pytest.fixture) -> None:
3838
if utils.is_resource_stale(response.create_time):
3939
try:
4040
delete_input.delete_input(project_name, location, next_input_id)
41+
except FailedPrecondition as e:
42+
print(f"Ignoring FailedPrecondition, details: {e}")
4143
except NotFound as e:
4244
print(f"Ignoring NotFound, details: {e}")
4345

0 commit comments

Comments
 (0)