Skip to content

Commit

Permalink
chore: reduce ttl time for sorted-set tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rishtigupta committed Sep 11, 2024
1 parent 35b8c91 commit 5f98863
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions packages/common-integration-tests/src/cache/sorted-set.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {v4} from 'uuid';
import {
CacheDelete,
CacheItemGetTtl,
CacheSortedSetFetch,
CacheSortedSetGetRank,
CacheSortedSetGetScore,
Expand Down Expand Up @@ -109,15 +108,7 @@ export function runSortedSetTests(
ttl: CollectionTtl.of(timeout * 10).withNoRefreshTtlOnUpdates(),
});
expect((changeResponse as IResponseSuccess).is_success).toBeTrue();
await sleep(timeout * 1000);
const getItemTTLResponse = await cacheClient.itemGetTtl(
integrationTestCacheName,
sortedSetName
);
expectWithMessage(() => {
expect(getItemTTLResponse).toBeInstanceOf(CacheItemGetTtl.Miss);
}, `expected MISS but got ${getItemTTLResponse.toString()}`);

await sleep(timeout * 1000 + 1);
const getResponse = await cacheClient.sortedSetFetchByRank(
integrationTestCacheName,
sortedSetName
Expand Down Expand Up @@ -2400,6 +2391,7 @@ export function runSortedSetTests(
};

const changeResponder = (props: ValidateSortedSetChangerProps) => {
console.log('props.ttl', props.ttl);
return cacheClient.sortedSetPutElements(
props.cacheName,
props.sortedSetName,
Expand Down

0 comments on commit 5f98863

Please sign in to comment.