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

Flaky tests detected: ConsumerJsonRecordTest.should_serialize_a_record_with_headers #685

Closed
hermya opened this issue Oct 6, 2024 · 1 comment
Assignees

Comments

@hermya
Copy link
Contributor

hermya commented Oct 6, 2024

The Problem:

There are some flaky-tests in the repo, which assert the output of non-deterministic outputs. They may pass in specific environment but possible fail in others. By using nondex, one can find such cases.

For example: ConsumerJsonRecordTest.should_serialize_a_record_with_headers fails intermittently

Expected: "{\"key\":123,\"value\":\"val\",\"headers\":{\"hKey\":\"hValue\",\"hKeyWithNullValue\":null}}"
     but: was "{\"key\":123,\"value\":\"val\",\"headers\":{\"hKeyWithNullValue\":null,\"hKey\":\"hValue\"}}"

Notice the string mismatch due to change in ordering of keys: {hKey, hKeyWithNullValue} <=> {hKeyWithNullValue, hKey}

About The Fix:

Answered here.

@nirmalchandra
Copy link
Collaborator

PR merge. Changes were only to Test classes, so no impact to the release versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants