adutra commented on code in PR #4841:
URL: https://github.com/apache/polaris/pull/4841#discussion_r3459008156


##########
runtime/service/src/testFixtures/java/org/apache/polaris/service/it/ServerManager.java:
##########
@@ -29,13 +32,30 @@
 
 public class ServerManager implements PolarisServerManager {
 
+  private static final ValueRegistry.RuntimeKey<Integer> MANAGEMENT_PORT =
+      ValueRegistry.RuntimeKey.intKey("quarkus.management.port");
+
   @Override
   public Server serverForContext(ExtensionContext context) {
     return new Server() {
 
       @Override
       public URI baseUri() {
-        return URI.create(String.format("http://localhost:%d";, 
getQuarkusTestPort(context)));
+        var registry = ValueRegistryInjector.get(context);
+        var config = ConfigInjector.get(context);
+        return URI.create(TestHTTPResourceManager.testUrl(registry, config));
+      }
+
+      @Override
+      public Optional<URI> managementUri() {
+        var registry = ValueRegistryInjector.get(context);
+        var config = ConfigInjector.get(context);
+        // Probe whether the actual port to use has been registered. If not, 
the management
+        // interface is not available, and we are likely in a 
@QuarkusIntegrationTest.
+        int dynamicPort = registry.getOrDefault(MANAGEMENT_PORT, -1);

Review Comment:
   Related:
   
   https://github.com/quarkusio/quarkus/pull/55023



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