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