momentohq / client-sdk-javascript

Official JavaScript SDK for Momento Serverless Cache
Apache License 2.0
55 stars 20 forks source link

chore: add getItemTtl to sortedSetPutElement failing test #1434

Closed rishtigupta closed 1 week ago

rishtigupta commented 1 week ago

PR Description:

The nodejs test for sortedSetPutElements fails on:

    ✘ Integration tests for sorted set operations > #sortedSetPutElements > does not refresh with no refresh ttl '(2119 ms)
     expected MISS but got Hit: valueArrayStringElements: 131ed5dd-b2da-4524-b635-be36df04f2b9: 42
     Error: expect(received).toBeInstanceOf(expected)

I suspect the reason is the sleep for 1 sec is not suffiient for the test. Adding 1ms to sleep timeout to avoid this from happening.

As of 09/11/24, same error occurred for dictionary tests (dashboard link).

● Integration tests for dictionary operations › #dictionarySetField › does not refresh with no refresh ttl
expected MISS but got Hit: value2
Error: expect(received).toBeInstanceOf(expected)

Adding 1ms to sleep timeout for dictionary tests too.