Skip to content

Flaky tests detected: ConsumerJsonRecordTest.should_serialize_a_record_with_headers #685

@hermya

Description

@hermya

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions