With System.setProperty("suppressTestResource", "true"); then the test resources application-test.yaml and application-test.properties will not be loaded.
This is desired to support the case where we want to run a main method in the test classpath that effectively uses the "main configuration" and ignores the "test configuration".
This use case is kind of a Utility that lives in src/test and has access to test dependencies etc but where we don't wish it to use the test configuration (we want it to ignore application-test.yaml etc).
With
System.setProperty("suppressTestResource", "true");
then the test resourcesapplication-test.yaml
andapplication-test.properties
will not be loaded.This is desired to support the case where we want to run a main method in the test classpath that effectively uses the "main configuration" and ignores the "test configuration".
This use case is kind of a Utility that lives in
src/test
and has access to test dependencies etc but where we don't wish it to use the test configuration (we want it to ignoreapplication-test.yaml
etc).