提交 93a46cc1 编写于 作者: L liwuli

After running testCase, setback system time

Signed-off-by: Nliwuli <liwuli@huawei.com>
上级 d644368d
......@@ -170,7 +170,7 @@ export default function edmCallbackTest() {
expect(isEnabled).assertTrue();
try {
var retValue = await enterpriseDeviceManager.disableAdmin(WANT1, DEFAULT_USER_ID);
await enterpriseDeviceManager.disableAdmin(WANT1, DEFAULT_USER_ID);
console.log('enterpriseDeviceManager.disableAdmin over');
} catch (error) {
expect(error != null).assertTrue();
......@@ -247,9 +247,11 @@ export default function edmCallbackTest() {
let dsmgr = await enterpriseDeviceManager.getDeviceSettingsManager();
expect(dsmgr !== null).assertTrue();
console.log('before setDateTime');
await dsmgr.setDateTime(SELFWANT, 1526003846000, OnReceiveEvent);
async function OnReceiveEvent() {
let currentTime = new Date().getTime();
await dsmgr.setDateTime(SELFWANT, currentTime, OnReceiveEvent);
async function OnReceiveEvent(error) {
await enterpriseDeviceManager.disableSuperAdmin(SELFHAPNAME);
expect(error === null).assertTrue();
done();
}
})
......
......@@ -284,7 +284,10 @@ export default function edmPromiseTest() {
let dsmgr = await enterpriseDeviceManager.getDeviceSettingsManager();
expect(dsmgr !== null).assertTrue();
console.log('before setDateTime');
await dsmgr.setDateTime(SELFWANT, 1526003846000);
let currentTime = new Date().getTime();
await dsmgr.setDateTime(SELFWANT, currentTime).catch((error)=>{
expect(error === null).assertTrue();
})
await enterpriseDeviceManager.disableSuperAdmin(SELFHAPNAME);
done();
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册