Fix ttl flaky test (#5686)
This commit is contained in:
committed by
Diamond Lewis
parent
1e2037753a
commit
466a049bd0
@@ -35,13 +35,13 @@ describe_only(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should expire after ttl', done => {
|
it('should expire after ttl', done => {
|
||||||
const cache = new RedisCacheAdapter(null, 1);
|
const cache = new RedisCacheAdapter(null, 50);
|
||||||
|
|
||||||
cache
|
cache
|
||||||
.put(KEY, VALUE)
|
.put(KEY, VALUE)
|
||||||
.then(() => cache.get(KEY))
|
.then(() => cache.get(KEY))
|
||||||
.then(value => expect(value).toEqual(VALUE))
|
.then(value => expect(value).toEqual(VALUE))
|
||||||
.then(wait.bind(null, 5))
|
.then(wait.bind(null, 52))
|
||||||
.then(() => cache.get(KEY))
|
.then(() => cache.get(KEY))
|
||||||
.then(value => expect(value).toEqual(null))
|
.then(value => expect(value).toEqual(null))
|
||||||
.then(done);
|
.then(done);
|
||||||
|
|||||||
Reference in New Issue
Block a user