bito-code-review[bot] commented on PR #16147:
URL: https://github.com/apache/grails-core/pull/16147#issuecomment-5287203767

   <!-- Bito Reply -->
   The user's concern regarding test flakiness due to external environment 
variables or system properties is valid. To make the test deterministic, you 
should ensure the `PropertyResolver` or `Environment` used in the test is 
isolated from the system environment. 
   
   Instead of relying on a default `StandardEnvironment`, you can use a 
`MutablePropertySources` instance with only the necessary properties, or a 
`MapPropertySource` that does not delegate to system properties. For example, 
when initializing the `HibernateDatastoreSpringInitializer` in your test, pass 
a `PropertySourcesPropertyResolver` configured with an empty or minimal 
`MutablePropertySources` instead of the default environment.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to