未验证 提交 4686ffba 编写于 作者: D dengyutao 提交者: Gitee

BlockUntilThreadAvailable接口用例添加

Signed-off-by: Ndengyutao <dengyutao2@huawei.com>
上级 108b3ada
......@@ -47,6 +47,14 @@ public:
void TearDown();
};
class IPCDfxTest : public testing::Test {
public:
static void SetUpTestCase(void);
static void TearDownTestCase(void);
void SetUp();
void TearDown();
};
void IPCSkeletonTest::SetUpTestCase()
{
}
......@@ -63,6 +71,22 @@ void IPCSkeletonTest::TearDown()
{
}
void IPCDfxTest::SetUpTestCase()
{
}
void IPCDfxTest::TearDownTestCase()
{
}
void IPCDfxTest::SetUp()
{
}
void IPCDfxTest::TearDown()
{
}
/**
* @tc.name: JoinWorkThreadTest001
* @tc.desc: Verify the JoinWorkThread function
......@@ -462,4 +486,21 @@ HWTEST_F(IPCSkeletonTest, SetCallingIdentityTest002, TestSize.Level1)
ASSERT_TRUE(result);
current->invokers_.clear();
delete invoker;
}
/**
* @tc.name: BlockUntilThreadAvailableTest001
* @tc.desc: Verify the BlockUntilThreadAvailable function
* @tc.type: FUNC
*/
HWTEST_F(IPCDfxTest, BlockUntilThreadAvailableTest001, TestSize.Level1)
{
IPCDfx *ipcDfxTest = new IPCDfx();
IPCProcessSkeleton *current = IPCProcessSkeleton::GetCurrent();
if (current != nullptr) {
ipcDfxTest->BlockUntilThreadAvailable();
ASSERT_TRUE(current->threadPool_->idleThreadNum_ > 0);
}
delete ipcDfxTest;
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册