Skip to content

fix(test): replace fragile instance-identity check in EntityModelLoadTest#749

Open
ikalachy wants to merge 1 commit into
mainfrom
fix/entity-model-loader-csn-test
Open

fix(test): replace fragile instance-identity check in EntityModelLoadTest#749
ikalachy wants to merge 1 commit into
mainfrom
fix/entity-model-loader-csn-test

Conversation

@ikalachy

Copy link
Copy Markdown
Collaborator

The previous assertion relied on CdsModelReader's internal Caffeine weak-reference cache returning the same CdsModel instance for two separate readCsnModel calls on the same file. Under GC pressure on CI the weak reference is collected between the two calls, producing different instances and a spurious test failure.

Replace with a structural assertion on the qualified names of services and entities, which is stable, meaningful, and independent of caching behaviour.

…erTest

The previous assertion relied on CdsModelReader's internal Caffeine weak-reference
cache returning the same CdsModel instance for two separate readCsnModel calls on
the same file. Under GC pressure on CI the weak reference is collected between the
two calls, producing different instances and a spurious test failure.

Replace with a structural assertion on the qualified names of services and entities,
which is stable, meaningful, and independent of caching behaviour.
@ikalachy ikalachy requested a review from a team as a code owner June 23, 2026 05:16
@ikalachy ikalachy requested a review from carlspring June 25, 2026 10:05

@carlspring carlspring left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, thanks!

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

Successfully merging this pull request may close these issues.

2 participants