Skip to content

Conversation

@stIncMale
Copy link
Member

@stIncMale stIncMale requested a review from vbabanin November 20, 2025 09:08
@stIncMale stIncMale self-assigned this Nov 20, 2025
@stIncMale stIncMale requested a review from a team as a code owner November 20, 2025 09:08
@DisplayName(
"MongoConfigurationContributor is called once per StandardServiceRegistry, different MongoConfigurator instances passed")
@SuppressWarnings("try")
void mongoConfigurationContributorInvocationsAndMongoConfiguratorInstances() {
Copy link
Member Author

Choose a reason for hiding this comment

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

I moved this test to MongoConfigurationContributorTests, as it is about MongoConfigurationContributor.

@DisplayName(
"MongoConfigurationContributor is called once per StandardServiceRegistry, different MongoConfigurator instances passed")
@SuppressWarnings("try")
void invocationsAndMongoConfiguratorInstances() {
Copy link
Member Author

Choose a reason for hiding this comment

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

This test is former StandardServiceRegistryScopedStateTests.mongoConfigurationContributorInvocationsAndMongoConfiguratorInstances. I moved it, and simplified: we don't need to close bootstrapServiceRegistry, standardServiceRegistry1, standardServiceRegistry2, because we have session factories successfully created here, and we close them, which causes the service registries to be automatically-closed (see https://docs.hibernate.org/orm/6.6/javadocs/org/hibernate/boot/registry/BootstrapServiceRegistryBuilder.html#disableAutoClose() and https://docs.hibernate.org/orm/6.6/javadocs/org/hibernate/boot/registry/StandardServiceRegistryBuilder.html#disableAutoClose()).

@stIncMale stIncMale removed the request for review from a team November 22, 2025 14:47
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.

1 participant