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

Count of error responses is not consistent based on SDK speed. #489

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

JamieSinn
Copy link
Member

No description provided.

@@ -105,7 +103,9 @@ describe('Initialize Tests - Local', () => {
0,
)
expect((await variable.json()).data.value).toEqual(0)
await wait(1100)
scope.get(configRequestUrl).reply(200, testClient.getValidConfig)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this apparently clears all previous and sets the new return scope. TIL

@@ -88,15 +88,13 @@ describe('Initialize Tests - Local', () => {
const testClient = new LocalTestClient(sdkName)
const configRequestUrl = testClient.getValidConfigPath()

scope.get(configRequestUrl).times(2).reply(500)
// a 500 is a recoverable error so it will retry the connection and potentially make more requests than expected.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why would it make more requests than the polling interval? or is the interval timer only started at successful call?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct - the interval timer starts at the successful call.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for all sdks? if that was the case would we have caught this or saw inconsistencies earlier?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No - it's specific to a few that are unique - ie .NET

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not fully confident that this wouldnt break other sdks.. but i guess if the tests pass then we can merge it..

@JamieSinn
Copy link
Member Author

event flake - should be fine

@JamieSinn JamieSinn merged commit fb24c00 into main Dec 13, 2024
5 of 7 checks passed
@JamieSinn JamieSinn deleted the config-request-count branch December 13, 2024 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants