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 401 unauthorised in integration tests #89

Closed
jwulf opened this issue Mar 26, 2024 · 1 comment
Closed

Intermittent 401 unauthorised in integration tests #89

jwulf opened this issue Mar 26, 2024 · 1 comment
Assignees
Milestone

Comments

@jwulf
Copy link
Member

jwulf commented Mar 26, 2024

"Randomly", a test will fail in the suite with a 401 Unauthorised response from an API.

Example:

 console.log
    Failed to search for process instances for 2251799813685806

      at src/zeebe/lib/cancelProcesses.ts:16:12

  console.log
    HTTPError: Response code 401 (Unauthorized) (request to http://localhost:8081/v1/process-instances/search)
        at Request.<anonymous> (/Users/jwulf/workspace/c8-sdk/node_modules/got/dist/source/as-promise/index.js:118:42)

This is probably due to an expired token being used for the request.

To debug this, I'll need to write a lifecycle unit test for the OAuth token expiry strategy.

@jwulf
Copy link
Member Author

jwulf commented Mar 26, 2024

Instead, I increased the token refresh threshold to 10s on SaaS. Let's see if this fixes it. Will reopen if it reoccurs.

@jwulf jwulf closed this as completed Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

No branches or pull requests

1 participant