Skip to content

Commit 036d4fa

Browse files
committed
test(cache): increase sleep time
1 parent 49d0289 commit 036d4fa

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

packages/cache/test/fixtures/base-app/src/cacheable/23a.class-decorator.controller.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class ClassDecoratorController {
5353
const ret2 = await this.svc.simple()
5454
validateMeta(ret2, cacheKey, this.midwayConfig.ttl)
5555

56-
await sleep(ttl * 1001)
56+
await sleep(ttl * 1005)
5757

5858
const ret2a = await this.svc.simple()
5959
validateMeta(ret2a, cacheKey, this.midwayConfig.ttl)
@@ -72,7 +72,7 @@ export class ClassDecoratorController {
7272
const ret2 = await this.svc.ttl()
7373
validateMeta(ret2, cacheKey, ttl)
7474

75-
await sleep(ttl * 1001)
75+
await sleep(ttl * 1005)
7676

7777
const ret2a = await this.svc.ttl()
7878
assert(! ret2a[ConfigKey.CacheMetaType])
@@ -101,7 +101,7 @@ export class ClassDecoratorController {
101101
assert(ret3a.value === 'OK')
102102
validateMeta(ret3a, `${cacheKey}:foo`, ttl)
103103

104-
await sleep(ttl * 1001)
104+
await sleep(ttl * 1005)
105105

106106
const ret4 = await this.svc.ttlFn('foo')
107107
assert(ret4.value === 'OK')
@@ -154,7 +154,7 @@ export class ClassDecoratorController {
154154
assert(ret8a.value === 1)
155155
validateMeta(ret8a, `${cacheKey}:1`, 1)
156156

157-
await sleep(ttl * 1001)
157+
await sleep(ttl * 1005)
158158

159159
const ret9 = await this.svc.ttlFn2('1')
160160
assert(ret9.value === 1)

packages/cache/test/fixtures/base-app/src/cacheable/25a.this.controller.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class ThisController {
5353
const ret2 = await this.svc.simple()
5454
validateMeta(ret2, cacheKey, this.midwayConfig.ttl)
5555

56-
await sleep(this.svc.ttlValue * 1001)
56+
await sleep(this.svc.ttlValue * 1005)
5757

5858
const ret2a = await this.svc.simple()
5959
validateMeta(ret2a, cacheKey, this.midwayConfig.ttl)
@@ -72,7 +72,7 @@ export class ThisController {
7272
const ret2 = await this.svc.ttl()
7373
validateMeta(ret2, cacheKey, this.svc.ttlValue)
7474

75-
await sleep(this.svc.ttlValue * 1001)
75+
await sleep(this.svc.ttlValue * 1005)
7676

7777
const ret2a = await this.svc.ttl()
7878
assert(! ret2a[ConfigKey.CacheMetaType])
@@ -101,7 +101,7 @@ export class ThisController {
101101
assert(ret3a.value === 'OK')
102102
validateMeta(ret3a, `${cacheKey}:foo`, this.svc.ttlValue)
103103

104-
await sleep(this.svc.ttlValue * 1001)
104+
await sleep(this.svc.ttlValue * 1005)
105105

106106
const ret4 = await this.svc.ttlFn('foo')
107107
assert(ret4.value === 'OK')
@@ -154,7 +154,7 @@ export class ThisController {
154154
assert(ret8a.value === 1)
155155
validateMeta(ret8a, `${cacheKey}:1`, 1)
156156

157-
await sleep(this.svc.ttlValue * 1001)
157+
await sleep(this.svc.ttlValue * 1005)
158158

159159
const ret9 = await this.svc.ttlFn2('1')
160160
assert(ret9.value === 1)

0 commit comments

Comments
 (0)