File tree 3 files changed +10
-10
lines changed
components/pryv-monitor/test
3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ describe('Monitor', function () {
64
64
}
65
65
}
66
66
] ) ;
67
- await new Promise ( resolve => setTimeout ( resolve , 2000 ) ) ;
67
+ await new Promise ( resolve => setTimeout ( resolve , 8000 ) ) ;
68
68
expect ( count ) . to . be . gt ( 0 ) ;
69
69
} ) ;
70
70
@@ -89,7 +89,7 @@ describe('Monitor', function () {
89
89
}
90
90
] ) ;
91
91
await monitor . updateEvents ( ) ; // trigger refresh
92
- await new Promise ( resolve => setTimeout ( resolve , 2000 ) ) ;
92
+ await new Promise ( resolve => setTimeout ( resolve , 8000 ) ) ;
93
93
expect ( count ) . to . be . gt ( 0 ) ;
94
94
} ) ;
95
95
} ) ;
Original file line number Diff line number Diff line change @@ -33,28 +33,28 @@ describe('Monitor + Socket.IO', function () {
33
33
expect ( event . content ) . to . equal ( eventData . content ) ;
34
34
count ++ ;
35
35
} ) ;
36
- await new Promise ( resolve => setTimeout ( resolve , 1000 ) ) ;
36
+ await new Promise ( resolve => setTimeout ( resolve , 6000 ) ) ;
37
37
await conn . api ( [
38
38
{
39
39
method : 'events.create' ,
40
40
params : eventData
41
41
}
42
42
] ) ;
43
43
44
- await new Promise ( resolve => setTimeout ( resolve , 2000 ) ) ;
44
+ await new Promise ( resolve => setTimeout ( resolve , 8000 ) ) ;
45
45
monitor . stop ( ) ;
46
46
expect ( count ) . to . be . gt ( 0 ) ;
47
47
} ) ;
48
48
} ) ;
49
49
50
50
describe ( 'stop' , ( ) => {
51
51
it ( 'Monitor stops when requested' , async function ( ) {
52
- this . timeout ( 4000 ) ;
52
+ this . timeout ( 20000 ) ;
53
53
const monitor = new pryv . Monitor ( apiEndpoint , { limit : 1 } )
54
54
. addUpdateMethod ( new pryv . Monitor . UpdateMethod . Socket ( ) ) ;
55
55
await monitor . start ( ) ;
56
56
let count = 0 ;
57
- await new Promise ( resolve => setTimeout ( resolve , 1000 ) ) ;
57
+ await new Promise ( resolve => setTimeout ( resolve , 4000 ) ) ;
58
58
monitor . stop ( ) ;
59
59
60
60
const eventData = {
@@ -73,7 +73,7 @@ describe('Monitor + Socket.IO', function () {
73
73
}
74
74
] ) ;
75
75
76
- await new Promise ( resolve => setTimeout ( resolve , 1000 ) ) ;
76
+ await new Promise ( resolve => setTimeout ( resolve , 6000 ) ) ;
77
77
expect ( count ) . to . equal ( 0 ) ;
78
78
} ) ;
79
79
} ) ;
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ describe('Monitor + EventsTimer', function () {
52
52
}
53
53
] ) ;
54
54
55
- await new Promise ( resolve => setTimeout ( resolve , 2000 ) ) ;
55
+ await new Promise ( resolve => setTimeout ( resolve , 4000 ) ) ;
56
56
monitor . stop ( ) ;
57
57
expect ( count ) . to . be . gt ( 0 ) ;
58
58
} ) ;
@@ -66,7 +66,7 @@ describe('Monitor + EventsTimer', function () {
66
66
await monitor . start ( ) ;
67
67
68
68
let count = 0 ;
69
- await new Promise ( resolve => setTimeout ( resolve , 1000 ) ) ;
69
+ await new Promise ( resolve => setTimeout ( resolve , 4000 ) ) ;
70
70
monitor . stop ( ) ;
71
71
72
72
// listener is added "after" so we don't get events loaded at start
@@ -87,7 +87,7 @@ describe('Monitor + EventsTimer', function () {
87
87
}
88
88
] ) ;
89
89
90
- await new Promise ( resolve => setTimeout ( resolve , 1000 ) ) ;
90
+ await new Promise ( resolve => setTimeout ( resolve , 5000 ) ) ;
91
91
expect ( count ) . to . equal ( 0 ) ;
92
92
} ) ;
93
93
} ) ;
You can’t perform that action at this time.
0 commit comments