mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2025-03-01 19:17:22 +00:00
modify test error
Signed-off-by: m30030488 <maluyao3@huawei.com>
This commit is contained in:
parent
d2034d4692
commit
10ea80d058
@ -16,6 +16,8 @@
|
||||
|
||||
#define private public
|
||||
#define protected public
|
||||
#include <thread>
|
||||
|
||||
#include "ability_connect_callback_stub.h"
|
||||
#include "distributed_sched_service.h"
|
||||
#include "distributed_sched_util.h"
|
||||
@ -35,6 +37,7 @@ using namespace testing::ext;
|
||||
|
||||
namespace {
|
||||
constexpr int32_t STDOUT_FD = 1;
|
||||
constexpr int32_t SLEEP_TIME = 1000;
|
||||
}
|
||||
|
||||
class AbilityConnectCallbackTest : public AAFwk::AbilityConnectionStub {
|
||||
@ -103,6 +106,9 @@ void AbilityConnectionWrapperStubTest::OnAbilityDisconnectDone(const AppExecFwk:
|
||||
|
||||
void DistributedSchedConnectTest::SetUpTestCase()
|
||||
{
|
||||
DnetworkAdapter::GetInstance()->Init();
|
||||
DtbschedmgrDeviceInfoStorage::GetInstance().Init();
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(SLEEP_TIME));
|
||||
}
|
||||
|
||||
void DistributedSchedConnectTest::TearDownTestCase()
|
||||
|
@ -14,6 +14,9 @@
|
||||
*/
|
||||
|
||||
#include "distributed_sched_continuation_test.h"
|
||||
|
||||
#include <thread>
|
||||
|
||||
#include "distributed_sched_util.h"
|
||||
#include "dtbschedmgr_device_info_storage.h"
|
||||
#include "mock_distributed_sched.h"
|
||||
@ -30,11 +33,15 @@ namespace {
|
||||
const std::u16string MOCK_DEVICE_ID = u"MOCK_DEVICE_ID";
|
||||
constexpr int32_t MOCK_SESSION_ID = 123;
|
||||
constexpr int32_t MOCK_TASK_ID = 456;
|
||||
constexpr int32_t SLEEP_TIME = 1000;
|
||||
const string LOCAL_DEVICE_ID = "192.168.43.100";
|
||||
}
|
||||
|
||||
void DSchedContinuationTest::SetUpTestCase()
|
||||
{
|
||||
DnetworkAdapter::GetInstance()->Init();
|
||||
DtbschedmgrDeviceInfoStorage::GetInstance().Init();
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(SLEEP_TIME));
|
||||
}
|
||||
|
||||
void DSchedContinuationTest::TearDownTestCase()
|
||||
|
@ -48,6 +48,7 @@ namespace {
|
||||
const string REMOTE_DEVICEID = "255.255.255.255";
|
||||
const std::u16string DEVICE_ID = u"192.168.43.100";
|
||||
constexpr int32_t SESSION_ID = 123;
|
||||
constexpr int32_t SLEEP_TIME = 1000;
|
||||
const std::string DMS_MISSION_ID = "dmsMissionId";
|
||||
constexpr int32_t MISSION_ID = 1;
|
||||
const std::string DMS_SRC_NETWORK_ID = "dmsSrcNetworkId";
|
||||
@ -75,7 +76,11 @@ protected:
|
||||
};
|
||||
|
||||
void DistributedSchedServiceTest::SetUpTestCase()
|
||||
{}
|
||||
{
|
||||
DnetworkAdapter::GetInstance()->Init();
|
||||
DtbschedmgrDeviceInfoStorage::GetInstance().Init();
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(SLEEP_TIME));
|
||||
}
|
||||
|
||||
void DistributedSchedServiceTest::TearDownTestCase()
|
||||
{}
|
||||
|
Loading…
x
Reference in New Issue
Block a user