From e3ec8551f4ef8da47f1b36fb8db197eddaa6dc56 Mon Sep 17 00:00:00 2001 From: chen0088 Date: Tue, 4 Mar 2025 16:30:21 +0800 Subject: [PATCH] modify ut Signed-off-by: chen0088 --- services/channel/src/dcamera_channel_source_impl.cpp | 2 +- services/channel/src/dcamera_softbus_session.cpp | 2 +- .../common/pipeline_node/abstract_data_process_test.cpp | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/services/channel/src/dcamera_channel_source_impl.cpp b/services/channel/src/dcamera_channel_source_impl.cpp index cbad0775..f190ad32 100644 --- a/services/channel/src/dcamera_channel_source_impl.cpp +++ b/services/channel/src/dcamera_channel_source_impl.cpp @@ -85,7 +85,7 @@ int32_t DCameraChannelSourceImpl::CreateSession(std::vector& camIn std::shared_ptr softbusSess = std::make_shared(myDevId, mySessionName_, peerDevId, peerSessionName, listener, sessionMode); int32_t socketId = softbusSess->BindSocketServer(); - if (socketId <= 0) { + if (socketId == 0 || socketId == DCAMERA_BAD_VALUE) { DHLOGE("DCameraChannelSourceImpl Create Session failed. socketId: %{public}d.", socketId); return DCAMERA_BAD_VALUE; } diff --git a/services/channel/src/dcamera_softbus_session.cpp b/services/channel/src/dcamera_softbus_session.cpp index 76ae3013..7ee7b790 100644 --- a/services/channel/src/dcamera_softbus_session.cpp +++ b/services/channel/src/dcamera_softbus_session.cpp @@ -338,7 +338,7 @@ int32_t DCameraSoftbusSession::BindSocketServer() { int32_t socketId = DCameraSoftbusAdapter::GetInstance().CreateSoftBusSourceSocketClient(myDevId_, peerSessionName_, peerDevId_, mode_, DCAMERA_CHANNLE_ROLE_SOURCE); - if (socketId <= 0) { + if (socketId == 0 || socketId == DCAMERA_BAD_VALUE) { DHLOGE("DCameraSoftbusSession BindSocketServer Error, socketId %{public}d", socketId); return socketId; } diff --git a/services/data_process/test/unittest/common/pipeline_node/abstract_data_process_test.cpp b/services/data_process/test/unittest/common/pipeline_node/abstract_data_process_test.cpp index 04588486..71eeecb6 100644 --- a/services/data_process/test/unittest/common/pipeline_node/abstract_data_process_test.cpp +++ b/services/data_process/test/unittest/common/pipeline_node/abstract_data_process_test.cpp @@ -49,7 +49,6 @@ void AbstractDataProcessTest::SetUp(void) void AbstractDataProcessTest::TearDown(void) { - testAbstractDataProcess_ = nullptr; } /** -- Gitee