davsclaus commented on code in PR #23378:
URL: https://github.com/apache/camel/pull/23378#discussion_r3275454848


##########
components/camel-google/camel-google-pubsub/src/test/java/org/apache/camel/component/google/pubsub/PubsubTestSupport.java:
##########
@@ -86,6 +94,24 @@ public Properties loadRegProperties() {
         return loadProperties();
     }
 
+    @Override
+    protected void setupResources() throws Exception {
+        ORPHAN_APPENDER.reset();
+        super.setupResources();
+    }
+
+    @Override
+    protected void cleanupResources() throws Exception {
+        super.cleanupResources();

Review Comment:
   `System.runFinalization()` was deprecated for removal in Java 18 (JEP 421) 
and is a no-op in Java 21+. Since Camel targets Java 17+, this will produce 
deprecation warnings on newer JDKs.
   
   Consider removing the `System.runFinalization()` call — the `System.gc()` 
hint alone is sufficient to trigger the `ManagedChannelOrphanWrapper` cleanup 
(which uses phantom references in newer gRPC versions, not finalizers).
   
   ```suggestion
           System.gc();
   ```



-- 
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