Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent ProtocolsQuery grant test failures. #481

Closed
LiranCohen opened this issue Aug 21, 2023 · 0 comments
Closed

Intermittent ProtocolsQuery grant test failures. #481

LiranCohen opened this issue Aug 21, 2023 · 0 comments
Labels
bug Something isn't working testing related to new or existing tests

Comments

@LiranCohen
Copy link
Member

I get the following tests intermittently failing, even on main:
rejects with 401 an external partys attempt to ProtocolsQuery if the grant is not yet active

Noticed on this PR run:
https://github.com/TBD54566975/dwn-sdk-js/actions/runs/5928353825/job/16073770372?pr=480

Tried to re-create on main by re-running tests back to back and was eventually able to trigger the ProtocolsQuery failure on main locally.

I put some logging in before catching it and got the following:

protocolsQueryTimestamp: 2023-08-21T16:14:37.169477Z
dateGranted: 2023-08-21T16:14:37.169477Z

It seems that putting sleep(1) still produces an identical timestamp in some rare cases.
https://github.com/TBD54566975/dwn-sdk-js/blob/5b7ebb836b1c11498a41653a984f930b49823844/tests/handlers/protocols-query.spec.ts#L276C1-L276C1

Will update this to sleep for 2 ms.

@LiranCohen LiranCohen added bug Something isn't working testing related to new or existing tests labels Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working testing related to new or existing tests
Projects
None yet
Development

No branches or pull requests

1 participant