@@ -33,20 +33,20 @@ describe_only(() => {
33
33
} ) ;
34
34
35
35
it ( 'should expire after ttl' , done => {
36
- const cache = new RedisCacheAdapter ( null , 50 ) ;
36
+ const cache = new RedisCacheAdapter ( null , 100 ) ;
37
37
38
38
cache
39
39
. put ( KEY , VALUE )
40
40
. then ( ( ) => cache . get ( KEY ) )
41
41
. then ( value => expect ( value ) . toEqual ( VALUE ) )
42
- . then ( wait . bind ( null , 52 ) )
42
+ . then ( wait . bind ( null , 102 ) )
43
43
. then ( ( ) => cache . get ( KEY ) )
44
44
. then ( value => expect ( value ) . toEqual ( null ) )
45
45
. then ( done ) ;
46
46
} ) ;
47
47
48
48
it ( 'should not store value for ttl=0' , done => {
49
- const cache = new RedisCacheAdapter ( null , 5 ) ;
49
+ const cache = new RedisCacheAdapter ( null , 100 ) ;
50
50
51
51
cache
52
52
. put ( KEY , VALUE , 0 )
@@ -56,20 +56,20 @@ describe_only(() => {
56
56
} ) ;
57
57
58
58
it ( 'should not expire when ttl=Infinity' , done => {
59
- const cache = new RedisCacheAdapter ( null , 1 ) ;
59
+ const cache = new RedisCacheAdapter ( null , 100 ) ;
60
60
61
61
cache
62
62
. put ( KEY , VALUE , Infinity )
63
63
. then ( ( ) => cache . get ( KEY ) )
64
64
. then ( value => expect ( value ) . toEqual ( VALUE ) )
65
- . then ( wait . bind ( null , 5 ) )
65
+ . then ( wait . bind ( null , 102 ) )
66
66
. then ( ( ) => cache . get ( KEY ) )
67
67
. then ( value => expect ( value ) . toEqual ( VALUE ) )
68
68
. then ( done ) ;
69
69
} ) ;
70
70
71
71
it ( 'should fallback to default ttl' , done => {
72
- const cache = new RedisCacheAdapter ( null , 1 ) ;
72
+ const cache = new RedisCacheAdapter ( null , 100 ) ;
73
73
let promise = Promise . resolve ( ) ;
74
74
75
75
[ - 100 , null , undefined , 'not number' , true ] . forEach ( ttl => {
@@ -78,7 +78,7 @@ describe_only(() => {
78
78
. put ( KEY , VALUE , ttl )
79
79
. then ( ( ) => cache . get ( KEY ) )
80
80
. then ( value => expect ( value ) . toEqual ( VALUE ) )
81
- . then ( wait . bind ( null , 5 ) )
81
+ . then ( wait . bind ( null , 102 ) )
82
82
. then ( ( ) => cache . get ( KEY ) )
83
83
. then ( value => expect ( value ) . toEqual ( null ) )
84
84
) ;
@@ -88,7 +88,7 @@ describe_only(() => {
88
88
} ) ;
89
89
90
90
it ( 'should find un-expired records' , done => {
91
- const cache = new RedisCacheAdapter ( null , 5 ) ;
91
+ const cache = new RedisCacheAdapter ( null , 100 ) ;
92
92
93
93
cache
94
94
. put ( KEY , VALUE )
@@ -101,7 +101,7 @@ describe_only(() => {
101
101
} ) ;
102
102
103
103
it ( 'handleShutdown, close connection' , async ( ) => {
104
- const cache = new RedisCacheAdapter ( null , 5 ) ;
104
+ const cache = new RedisCacheAdapter ( null , 100 ) ;
105
105
106
106
await cache . handleShutdown ( ) ;
107
107
setTimeout ( ( ) => {
0 commit comments