Skip to content

Commit

Permalink
chore: test
Browse files Browse the repository at this point in the history
  • Loading branch information
sunxilin authored and halajohn committed Dec 6, 2024
1 parent b3fde17 commit 9bd8044
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ group("no_dest_python") {
deps = [
":no_dest_python_app",
":no_dest_python_test_files",
"//tests/ten_runtime/integration/python:copy_pytest_ini_for_ten_runtime_python_integration_test",
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def handle_error(self, ten_env: TenEnv, error: Optional[TenError]) -> None:
ten_env.log_error("DefaultExtension handle_error: " + error.err_msg())

self.no_dest_error_recv_count += 1
if self.no_dest_error_recv_count == 4:
if self.no_dest_error_recv_count == 1:
ten_env.on_start_done()

def on_start(self, ten_env: TenEnv) -> None:
Expand All @@ -55,26 +55,28 @@ def on_start(self, ten_env: TenEnv) -> None:
lambda ten_env, result, error: self.handle_error(ten_env, error),
)

# Send an unconnected data
data = Data.create("unconnected_data")
ten_env.send_data(
data,
lambda ten_env, error: self.handle_error(ten_env, error),
)

# Send an unconnected video frame
video_frame = VideoFrame.create("unconnected_video_frame")
ten_env.send_video_frame(
video_frame,
lambda ten_env, error: self.handle_error(ten_env, error),
)

# Send an unconnected audio frame
audio_frame = AudioFrame.create("unconnected_audio_frame")
ten_env.send_audio_frame(
audio_frame,
lambda ten_env, error: self.handle_error(ten_env, error),
)
# # Send an unconnected data
# data = Data.create("unconnected_data")
# ten_env.send_data(
# data,
# lambda ten_env, error: self.handle_error(ten_env, error),
# )

# # Send an unconnected video frame
# video_frame = VideoFrame.create("unconnected_video_frame")
# ten_env.send_video_frame(
# video_frame,
# lambda ten_env, error: self.handle_error(ten_env, error),
# )

# # Send an unconnected audio frame
# audio_frame = AudioFrame.create("unconnected_audio_frame")
# ten_env.send_audio_frame(
# audio_frame,
# lambda ten_env, error: self.handle_error(ten_env, error),
# )

ten_env.on_start_done()

def on_stop(self, ten_env: TenEnv) -> None:
print("DefaultExtension on_stop")
Expand Down

0 comments on commit 9bd8044

Please sign in to comment.