Skip to content

Flaky Test: ConverterAwareMappingSpannerEntityReaderTests.readUnmatachableTypesTest() #4186

@pem70

Description

@pem70

Description

This test readUnmatachableTypesTest() fails intermittently because it asserts the exact exception message ("...: id").
The underlying reader processes entity fields in a non-deterministic order (e.g., reflection order), so the first field that triggers the exception can change between runs.
As a result, the message may not always end with : id, causing flaky test failures even though the exception type is correct.

How to Reproduce

Run the test with the NonDex plugin to randomize iteration order:

mvn -pl spring-cloud-gcp-data-spanner edu.illinois:nondex-maven-plugin:2.1.7:nondex -Dtest=ConverterAwareMappingSpannerEntityReaderTests#readUnmatachableTypesTest

Additional

I have a fix ready for this test, and I can make the PR if permitted.
Also, there is a typo in the test name.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions