修改警告

Signed-off-by: bWX1145125 <bianjianliang1@huawei.com>
This commit is contained in:
bWX1145125 2023-11-27 15:03:15 +08:00
parent ffe0edc717
commit 3ab6130e93
2 changed files with 4 additions and 4 deletions

View File

@ -66,7 +66,7 @@ std::string DPTest::GetDevProfileTest()
{
ServiceCharacteristicProfile profile;
std::string testServiceId = profile.GetServiceId();
DistributedDeviceProfileClient::GetInstance().GetDeviceProfile("", serviceId, profile);
DistributedDeviceProfileClient::GetInstance().GetDeviceProfile("", testServiceId, profile);
std::string jsonData = profile.GetCharacteristicProfileJson();
if(jsonData.empty()){
DHLOGI("demo test: GetDevProfileTest GetCharacteristicProfileJson error");
@ -131,7 +131,6 @@ int DPTest::DeleteDevProfileTest()
int DPTest::SyncDveProfileTest(){
ServiceCharacteristicProfile profile;
std::string devices = JSON.stringify(dmDeviceInfo[0]["deviceId"]);
SyncOptions syncOption;
syncOption.SetSyncMode((OHOS::DeviceProfile::SyncMode)atoi(mode.c_str()));
for (const auto& deviceId : deviceIds) {
@ -158,7 +157,7 @@ int DPTest::SubscribeProfileEventsTest(){
// 订阅EVENT_PROFILE_CHANGED事件
ExtraInfo extraInfo;
extraInfo["deviceId"] = deviceId;
extraInfo["serviceIds"] = serviceIds;
extraInfo["serviceIds"] = ServiceIds;
SubscribeInfo changeEventInfo;
changeEventInfo.profileEvent = ProfileEvent::EVENT_PROFILE_CHANGED;
changeEventInfo.extraInfo = std::move(extraInfo);

View File

@ -67,7 +67,8 @@ void ServiceProfileTest::TearDown()
* @tc.type : FUNC
* @tc.size : Medium test
*/
HWTEST_F(ServiceProfileTest, SUB_DH_DPTSET_Dcts__001, TestSize.Level1)
HWTEST_F(ServiceProfileTest, SUB_DH_DPTSET_Dcts__001, TestSize.Level3)
{
std::string ret = mainDemo->PutDevProfileTest();
std::string res = mainDemo->GetDevProfileTest();