提交 6f2c6e1d 编写于 作者: C chenxuihui

hiappeventsubjscommit

Signed-off-by: Nchenxuihui <chenxuhui2@huawei.com>
上级 1a6e4e40
......@@ -120,12 +120,12 @@ describe('HiAppEventSubTest', function () {
*/
it('HiAppEventSub02', 3, async function (done) {
console.info('testHiAppEventSub02 start')
function sleep(numberMillis){
function sleep(numberMillis) {
var now = new Date();
var exitTime = now.getTime() +numberMillis;
while (true){
var exitTime = now.getTime() + numberMillis;
while (true) {
now = new Date();
if(now.getTime() > exitTime)
if (now.getTime() > exitTime)
return;
}
}
......@@ -1258,12 +1258,12 @@ describe('HiAppEventSubTest', function () {
*/
it('HiAppEventSub16', 3, async function (done) {
console.info('testHiAppEventSub16 start')
function sleep(numberMillis){
function sleep(numberMillis) {
var now = new Date();
var exitTime = now.getTime() +numberMillis;
while (true){
var exitTime = now.getTime() + numberMillis;
while (true) {
now = new Date();
if(now.getTime() > exitTime)
if (now.getTime() > exitTime)
return;
}
}
......@@ -1341,12 +1341,12 @@ describe('HiAppEventSubTest', function () {
*/
it('HiAppEventSub17', 3, async function (done) {
console.info('testHiAppEventSub17 start')
function sleep(numberMillis){
function sleep(numberMillis) {
var now = new Date();
var exitTime = now.getTime() +numberMillis;
while (true){
var exitTime = now.getTime() + numberMillis;
while (true) {
now = new Date();
if(now.getTime() > exitTime)
if (now.getTime() > exitTime)
return;
}
}
......@@ -1635,12 +1635,12 @@ describe('HiAppEventSubTest', function () {
*/
it('HiAppEventSub22', 3, async function (done) {
console.info('testHiAppEventSub22 start')
function sleep(numberMillis){
function sleep(numberMillis) {
var now = new Date();
var exitTime = now.getTime() +numberMillis;
while (true){
var exitTime = now.getTime() + numberMillis;
while (true) {
now = new Date();
if(now.getTime() > exitTime)
if (now.getTime() > exitTime)
return;
}
}
......@@ -1689,7 +1689,6 @@ describe('HiAppEventSubTest', function () {
}, 1000)
})
/**
* @tc.number DFX_DFT_HiAppEvent_Sub_2300
* @tc.name 验证调用hiAppEvent.addWatcher,timeout=0,事件订阅失败
......@@ -1697,12 +1696,12 @@ describe('HiAppEventSubTest', function () {
*/
it('HiAppEventSub23', 3, async function (done) {
console.info('testHiAppEventSub23 start')
function sleep(numberMillis){
function sleep(numberMillis) {
var now = new Date();
var exitTime = now.getTime() +numberMillis;
while (true){
var exitTime = now.getTime() + numberMillis;
while (true) {
now = new Date();
if(now.getTime() > exitTime)
if (now.getTime() > exitTime)
return;
}
}
......@@ -1751,7 +1750,6 @@ describe('HiAppEventSubTest', function () {
}, 1000)
})
/**
* @tc.number DFX_DFT_HiAppEvent_Sub_2400
* @tc.name 验证调用hiAppEvent.addWatcher,未设置触发条件,事件订阅失败
......@@ -1759,12 +1757,12 @@ describe('HiAppEventSubTest', function () {
*/
it('HiAppEventSub24', 3, async function (done) {
console.info('testHiAppEventSub24 start')
function sleep(numberMillis){
function sleep(numberMillis) {
var now = new Date();
var exitTime = now.getTime() +numberMillis;
while (true){
var exitTime = now.getTime() + numberMillis;
while (true) {
now = new Date();
if(now.getTime() > exitTime)
if (now.getTime() > exitTime)
return;
}
}
......@@ -1815,12 +1813,14 @@ describe('HiAppEventSubTest', function () {
* @tc.name 验证调用hiAppEvent.addWatcher,触发条件仅timeout有效,事件订阅成功
* @tc.desc HiAppEvent write interface test.
*/
function sleep(numberMillis){
it('HiAppEventSub28', 3, async function (done) {
console.info('testHiAppEventSub28 start')
function sleep(numberMillis) {
var now = new Date();
var exitTime = now.getTime() +numberMillis;
while (true){
var exitTime = now.getTime() + numberMillis;
while (true) {
now = new Date();
if(now.getTime() > exitTime)
if (now.getTime() > exitTime)
return;
}
}
......@@ -1923,7 +1923,6 @@ describe('HiAppEventSubTest', function () {
}, 1000)
})
/**
* @tc.number DFX_DFT_HiAppEvent_Sub_2500
* @tc.name 验证调用removeWatcher,watcher为已有watcher,订阅者、相关订阅事件删除成功
......@@ -1962,7 +1961,6 @@ describe('HiAppEventSubTest', function () {
})
/**
* @tc.number DFX_DFT_HiAppEvent_Sub_2600
* @tc.name 验证调用removeWatcher,watcher无效,订阅者、相关订阅事件删除失败
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册