Skip to content

Commit

Permalink
test(cache): increase sleep time
Browse files Browse the repository at this point in the history
  • Loading branch information
waitingsong committed Jan 24, 2025
1 parent 49d0289 commit 9b0f6b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class ClassDecoratorController {
const ret2 = await this.svc.simple()
validateMeta(ret2, cacheKey, this.midwayConfig.ttl)

await sleep(ttl * 1001)
await sleep(ttl * 1002)

const ret2a = await this.svc.simple()
validateMeta(ret2a, cacheKey, this.midwayConfig.ttl)
Expand All @@ -72,7 +72,7 @@ export class ClassDecoratorController {
const ret2 = await this.svc.ttl()
validateMeta(ret2, cacheKey, ttl)

await sleep(ttl * 1001)
await sleep(ttl * 1002)

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

await sleep(ttl * 1001)
await sleep(ttl * 1002)

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

await sleep(ttl * 1001)
await sleep(ttl * 1002)

const ret9 = await this.svc.ttlFn2('1')
assert(ret9.value === 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class ThisController {
const ret2 = await this.svc.simple()
validateMeta(ret2, cacheKey, this.midwayConfig.ttl)

await sleep(this.svc.ttlValue * 1001)
await sleep(this.svc.ttlValue * 1002)

const ret2a = await this.svc.simple()
validateMeta(ret2a, cacheKey, this.midwayConfig.ttl)
Expand All @@ -72,7 +72,7 @@ export class ThisController {
const ret2 = await this.svc.ttl()
validateMeta(ret2, cacheKey, this.svc.ttlValue)

await sleep(this.svc.ttlValue * 1001)
await sleep(this.svc.ttlValue * 1002)

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

await sleep(this.svc.ttlValue * 1001)
await sleep(this.svc.ttlValue * 1002)

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

await sleep(this.svc.ttlValue * 1001)
await sleep(this.svc.ttlValue * 1002)

const ret9 = await this.svc.ttlFn2('1')
assert(ret9.value === 1)
Expand Down

0 comments on commit 9b0f6b6

Please sign in to comment.