From ce4f755f5468c9fe07e78f9316fd529cbe69f0d9 Mon Sep 17 00:00:00 2001 From: Dean Wheatley Date: Mon, 30 Nov 2020 22:02:14 +1100 Subject: [PATCH] Close stream at end of OpenAnOpenedStreamsTest The following test CloseStreamBeforeOpenTest assumes that there are no open streams. Bug: 174686912 Test: atest VtsHalTvInputV1_0TargetTest against mock binderized TV input HAL Change-Id: I589fdee5e5181f2aa32977cb2594ec61410fb7b1 --- tv/input/1.0/vts/functional/VtsHalTvInputV1_0TargetTest.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tv/input/1.0/vts/functional/VtsHalTvInputV1_0TargetTest.cpp b/tv/input/1.0/vts/functional/VtsHalTvInputV1_0TargetTest.cpp index 59c70eb1e2..e051297e56 100644 --- a/tv/input/1.0/vts/functional/VtsHalTvInputV1_0TargetTest.cpp +++ b/tv/input/1.0/vts/functional/VtsHalTvInputV1_0TargetTest.cpp @@ -313,6 +313,9 @@ TEST_P(TvInputHidlTest, OpenAnOpenedStreamsTest) { tv_input_->openStream(device_id, stream_id, [&result](Result res, const native_handle_t*) { result = res; }); EXPECT_EQ(Result::INVALID_STATE, result); + + // close stream as subsequent tests assume no open streams + EXPECT_EQ(Result::OK, tv_input_->closeStream(device_id, stream_id)); } /*