madrob commented on a change in pull request #2430: URL: https://github.com/apache/lucene-solr/pull/2430#discussion_r583262258
########## File path: solr/core/src/test/org/apache/solr/security/JWTIssuerConfigTest.java ########## @@ -125,6 +128,31 @@ public void parseIssuerConfigExplicit() { assertEquals("https://host/jwk", issuerConfig.getJwksUrls().get(0)); } + @Test Review comment: If you want to stand up a lightweight server, you can do something like this. You'll probably want to randomize the port (maybe you can pass 0 to always get an open port?) ``` @SuppressForbidden(reason="using httpserver to mock a response") @Test public void wellKnownConfigWithHttpLogsAWarning() throws IOException { com.sun.net.httpserver.HttpServer server = HttpServer.create(new InetSocketAddress("127.0.0.1", 45678), 1); server.createContext("/", exchange -> { Path configJson = TEST_PATH().resolve("security").resolve("jwt_well-known-config.json"); exchange.sendResponseHeaders(200, 0); exchange.getResponseBody().write(Files.readAllBytes(configJson)); exchange.close(); }); try { server.start(); // stuff } finally { server.stop(0); } } ``` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org