luigidemasi commented on PR #20338: URL: https://github.com/apache/camel/pull/20338#issuecomment-3637681412
> we have some JMX tests that also uses JVM system properties. > > I am not sure if this kind of testing can be done in a similar way > > https://github.com/apache/camel/blob/aeb57bf9b34658eba075574e03c6132bb07f5382/core/camel-management/src/test/java/org/apache/camel/management/ManagedNamePatternJvmSystemPropertyTest.java#L37 @davsclaus Unfortunately, no. @ResourceLock prevents concurrent access/modification to a specific resource. The problem here is that running a test affects the initial state and, consequently, the execution of subsequent tests, as @essobedo wrote here: https://github.com/apache/camel/blob/aeb57bf9b34658eba075574e03c6132bb07f5382/components/camel-http/src/test/java/org/apache/camel/component/http/HttpsProducerWithSystemPropertiesTest.java#L44-L46 That's why I believe they require an isolated JVM. -- 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]
