!695 【distributedhardware】【master】分布式Dp用例维护

Merge pull request !695 from bjliang/master
This commit is contained in:
openharmony_ci 2024-08-15 08:33:53 +00:00 committed by Gitee
commit 46893c7b7f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 11 additions and 10 deletions

View File

@ -39,11 +39,12 @@ export default function distributedDeviceManager() {
let driver = await UiDriver.create();
console.info(`come in driveFn`);
console.info(`driver is ${JSON.stringify(driver)}`);
sleep(2000);
await sleep(1000);
let button = await driver.findComponent(BY.text('允许'));
console.info(`button is ${JSON.stringify(button)}`);
sleep(5000);
await sleep(1000);
await button.click();
await sleep(1000);
} catch (err) {
console.info('err is ' + err);
return;
@ -53,9 +54,9 @@ export default function distributedDeviceManager() {
beforeAll(async function (done) {
console.info("beforeAll start");
await getPermission();
sleep(5000);
await sleep(1000);
await driveFn();
sleep(5000);
await sleep(1000);
console.info("beforeAll done");
done();
})

View File

@ -497,7 +497,7 @@ HWTEST_F(DeviceProfileManagerTest, SUB_DH_DDp_Dcts_1800, TestSize.Level1)
string deviceId = "anything2";
DeviceProfile outDeviceProfile;
int32_t ret = DeviceProfileManager::GetInstance().GetDeviceProfile(deviceId, outDeviceProfile);
EXPECT_EQ(ret, DP_INVALID_PARAMS);
EXPECT_EQ(ret, DP_GET_KV_DB_FAIL);
string outDeviceId = outDeviceProfile.GetDeviceId();
outDeviceProfile.GetDeviceTypeName();
@ -554,7 +554,7 @@ HWTEST_F(DeviceProfileManagerTest, SUB_DH_DDp_Dcts_2100, TestSize.Level1)
DeviceProfileManager::GetInstance().deviceProfileStore_->UnInit();
DeviceProfile outDeviceProfile;
int32_t ret = DeviceProfileManager::GetInstance().GetDeviceProfile(deviceId, outDeviceProfile);
EXPECT_EQ(ret, DP_INVALID_PARAMS);
EXPECT_EQ(ret, DP_GET_KV_DB_FAIL);
}
/**
@ -575,7 +575,7 @@ HWTEST_F(DeviceProfileManagerTest, SUB_DH_DDp_Dcts_2200, TestSize.Level1)
string serviceName = "serviceName5";
ServiceProfile outServiceProfile;
int32_t ret = DeviceProfileManager::GetInstance().GetServiceProfile(deviceId, serviceName, outServiceProfile);
EXPECT_EQ(ret, DP_INVALID_PARAMS);
EXPECT_EQ(ret, DP_GET_KV_DB_FAIL);
string outDeviceId = outServiceProfile.GetDeviceId();
outServiceProfile.GetServiceName();
@ -632,7 +632,7 @@ HWTEST_F(DeviceProfileManagerTest, SUB_DH_DDp_Dcts_2500, TestSize.Level1)
DeviceProfileManager::GetInstance().deviceProfileStore_->UnInit();
ServiceProfile outServiceProfile;
int32_t ret = DeviceProfileManager::GetInstance().GetServiceProfile(deviceId, serviceName, outServiceProfile);
EXPECT_EQ(ret, DP_INVALID_PARAMS);
EXPECT_EQ(ret, DP_GET_KV_DB_FAIL);
}
/**
@ -656,7 +656,7 @@ HWTEST_F(DeviceProfileManagerTest, SUB_DH_DDp_Dcts_2600, TestSize.Level1)
CharacteristicProfile outCharProfile;
int32_t ret = DeviceProfileManager::GetInstance().GetCharacteristicProfile(deviceId, serviceName,
characteristicKey, outCharProfile);
EXPECT_EQ(ret, DP_INVALID_PARAMS);
EXPECT_EQ(ret, DP_GET_KV_DB_FAIL);
string outDeviceId = outCharProfile.GetDeviceId();
outCharProfile.GetServiceName();
@ -722,7 +722,7 @@ HWTEST_F(DeviceProfileManagerTest, SUB_DH_DDp_Dcts_2900, TestSize.Level1)
CharacteristicProfile outCharProfile;
int32_t ret = DeviceProfileManager::GetInstance().GetCharacteristicProfile(deviceId, serviceName,
characteristicKey, outCharProfile);
EXPECT_EQ(ret, DP_INVALID_PARAMS);
EXPECT_EQ(ret, DP_GET_KV_DB_FAIL);
}
/**