gnodet-bot commented on code in PR #30148:
URL: https://github.com/apache/camel/pull/30148#discussion_r4597899191


##########
components/camel-oauth/src/test/java/org/apache/camel/test/oauth/OAuthCodeFlowVertxTest.java:
##########
@@ -37,11 +38,19 @@
  */
 class OAuthCodeFlowVertxTest extends AbstractOAuthCodeFlowTest {
 
+    static final AvailablePortFinder.Port SERVER_PORT = 
AvailablePortFinder.find();
+    static final int PORT = SERVER_PORT.getPort();

Review Comment:
   ⚠️ **Missing `@RegisterExtension`**: `OAuthClientCredentialsVertxTest`, 
`OAuthClientCredentialsServletTest`, and `OAuthCodeFlowServletTest` all got 
`@RegisterExtension` in this commit — but this class was missed. Without it, 
`afterAll` never fires, the port is never released from 
`AvailablePortFinder.portMapping`, and long-running JVM forks risk a 
`BindException` on port reuse.
   
   ```suggestion
       @RegisterExtension
       static final AvailablePortFinder.Port SERVER_PORT = 
AvailablePortFinder.find();
   ```
   
   Also add `import org.junit.jupiter.api.extension.RegisterExtension;` with 
the other imports.



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