Skip to content

Unify RealmEntityManagerFactory usage in tests #2050

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

Merged

Conversation

XN137
Copy link
Contributor

@XN137 XN137 commented Jul 15, 2025

since all ctor params are created in IcebergCatalogTest.before we can do the same for RealmEntityManagerFactory

PolarisAuthzTestBase.entityManager was already getting derived from realmEntityManagerFactory here:

this.entityManager = realmEntityManagerFactory.getOrCreateEntityManager(realmContext);

since all ctor params are created in `IcebergCatalogTest.before` we
can do the same for `RealmEntityManagerFactory`

`PolarisAuthzTestBase.entityManager` is already getting derived from
`realmEntityManagerFactory`:
https://github.com/apache/polaris/blob/2c2052c28f899aaa85e5f11a9131d9812ec62679/runtime/service/src/test/java/org/apache/polaris/service/quarkus/admin/PolarisAuthzTestBase.java#L247
return entityManager;
}
},
realmEntityManagerFactory,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note that realmEntityManagerFactory was already being used 4 lines below this one

@XN137 XN137 marked this pull request as ready for review July 15, 2025 09:11
@github-project-automation github-project-automation bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Jul 15, 2025
@eric-maynard eric-maynard merged commit 38d7dbf into apache:main Jul 15, 2025
12 checks passed
@github-project-automation github-project-automation bot moved this from Ready to merge to Done in Basic Kanban Board Jul 15, 2025
adam-christian-software pushed a commit to adam-christian-software/polaris that referenced this pull request Jul 18, 2025
since all ctor params are created in `IcebergCatalogTest.before` we
can do the same for `RealmEntityManagerFactory`

`PolarisAuthzTestBase.entityManager` is already getting derived from
`realmEntityManagerFactory`:
https://github.com/apache/polaris/blob/2c2052c28f899aaa85e5f11a9131d9812ec62679/runtime/service/src/test/java/org/apache/polaris/service/quarkus/admin/PolarisAuthzTestBase.java#L247
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