File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed
components/pryv-monitor/test Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ describe('Monitor', function () {
6464 }
6565 }
6666 ] ) ;
67- await new Promise ( resolve => setTimeout ( resolve , 2000 ) ) ;
67+ await new Promise ( resolve => setTimeout ( resolve , 8000 ) ) ;
6868 expect ( count ) . to . be . gt ( 0 ) ;
6969 } ) ;
7070
@@ -89,7 +89,7 @@ describe('Monitor', function () {
8989 }
9090 ] ) ;
9191 await monitor . updateEvents ( ) ; // trigger refresh
92- await new Promise ( resolve => setTimeout ( resolve , 2000 ) ) ;
92+ await new Promise ( resolve => setTimeout ( resolve , 8000 ) ) ;
9393 expect ( count ) . to . be . gt ( 0 ) ;
9494 } ) ;
9595 } ) ;
Original file line number Diff line number Diff line change @@ -33,28 +33,28 @@ describe('Monitor + Socket.IO', function () {
3333 expect ( event . content ) . to . equal ( eventData . content ) ;
3434 count ++ ;
3535 } ) ;
36- await new Promise ( resolve => setTimeout ( resolve , 1000 ) ) ;
36+ await new Promise ( resolve => setTimeout ( resolve , 6000 ) ) ;
3737 await conn . api ( [
3838 {
3939 method : 'events.create' ,
4040 params : eventData
4141 }
4242 ] ) ;
4343
44- await new Promise ( resolve => setTimeout ( resolve , 2000 ) ) ;
44+ await new Promise ( resolve => setTimeout ( resolve , 8000 ) ) ;
4545 monitor . stop ( ) ;
4646 expect ( count ) . to . be . gt ( 0 ) ;
4747 } ) ;
4848 } ) ;
4949
5050 describe ( 'stop' , ( ) => {
5151 it ( 'Monitor stops when requested' , async function ( ) {
52- this . timeout ( 4000 ) ;
52+ this . timeout ( 20000 ) ;
5353 const monitor = new pryv . Monitor ( apiEndpoint , { limit : 1 } )
5454 . addUpdateMethod ( new pryv . Monitor . UpdateMethod . Socket ( ) ) ;
5555 await monitor . start ( ) ;
5656 let count = 0 ;
57- await new Promise ( resolve => setTimeout ( resolve , 1000 ) ) ;
57+ await new Promise ( resolve => setTimeout ( resolve , 4000 ) ) ;
5858 monitor . stop ( ) ;
5959
6060 const eventData = {
@@ -73,7 +73,7 @@ describe('Monitor + Socket.IO', function () {
7373 }
7474 ] ) ;
7575
76- await new Promise ( resolve => setTimeout ( resolve , 1000 ) ) ;
76+ await new Promise ( resolve => setTimeout ( resolve , 6000 ) ) ;
7777 expect ( count ) . to . equal ( 0 ) ;
7878 } ) ;
7979 } ) ;
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ describe('Monitor + EventsTimer', function () {
5252 }
5353 ] ) ;
5454
55- await new Promise ( resolve => setTimeout ( resolve , 2000 ) ) ;
55+ await new Promise ( resolve => setTimeout ( resolve , 4000 ) ) ;
5656 monitor . stop ( ) ;
5757 expect ( count ) . to . be . gt ( 0 ) ;
5858 } ) ;
@@ -66,7 +66,7 @@ describe('Monitor + EventsTimer', function () {
6666 await monitor . start ( ) ;
6767
6868 let count = 0 ;
69- await new Promise ( resolve => setTimeout ( resolve , 1000 ) ) ;
69+ await new Promise ( resolve => setTimeout ( resolve , 4000 ) ) ;
7070 monitor . stop ( ) ;
7171
7272 // listener is added "after" so we don't get events loaded at start
@@ -87,7 +87,7 @@ describe('Monitor + EventsTimer', function () {
8787 }
8888 ] ) ;
8989
90- await new Promise ( resolve => setTimeout ( resolve , 1000 ) ) ;
90+ await new Promise ( resolve => setTimeout ( resolve , 5000 ) ) ;
9191 expect ( count ) . to . equal ( 0 ) ;
9292 } ) ;
9393 } ) ;
You can’t perform that action at this time.
0 commit comments