modify UT

Signed-off-by: zhaolinglan <zhaolinglan@huawei.com>
This commit is contained in:
zhaolinglan 2024-03-20 21:26:09 +08:00
parent 2a77f087f1
commit 10a9c92e1e
2 changed files with 4 additions and 0 deletions

View File

@ -515,6 +515,7 @@ int32_t InputMethodSystemAbility::OnSwitchInputMethod(const SwitchInfo &switchIn
if (!switchQueue_.IsReady(switchInfo)) {
IMSA_HILOGD("start wait");
switchQueue_.Wait(switchInfo);
usleep(SWITCH_BLOCK_TIME);
}
IMSA_HILOGI("start switch %{public}s|%{public}s", switchInfo.bundleName.c_str(), switchInfo.subName.c_str());
int32_t ret = CheckSwitchPermission(switchInfo, trigger);

View File

@ -62,7 +62,10 @@ void InputMethodPrivateMemberTest::SetUpTestCase(void)
void InputMethodPrivateMemberTest::TearDownTestCase(void)
{
service_->OnStop();
TddUtil::StorageSelfTokenID();
TddUtil::GrantNativePermission();
TddUtil::KillImsaProcess();
TddUtil::RestoreSelfTokenID();
IMSA_HILOGI("InputMethodPrivateMemberTest::TearDownTestCase");
}