RFR: 8288885: Introduce a jwebserver launcher utility in test library for jtreg tests [v2]
Alan Bateman
alanb at openjdk.org
Wed Jun 22 08:04:41 UTC 2022
On Wed, 22 Jun 2022 07:44:34 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> Can I please get a review for this change which adds a utility to the JDK test library to help launch the JWebServer? As noted in the JBS issue, this utility does the necessary work to make sure when the `launch()` method returns, the jwebserver is ready to receive requests. This helps remove a lot of boilerplate code from individual tests.
>>
>> As part of this commit, the existing `MaxRequestTimeTest` has been migrated to use this new utility. This existing test continues to pass with this change.
>>
>> tier1, tier2 and tier3 testing passed without any related issues.
>
> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>
> clarify that the jwebserver is launched as a separate process and needs to be destroyed by the caller when it's no longer needed
test/lib/jdk/test/lib/net/SimpleHttpServer.java already exists and may have been added to support tests for MR JARs. I think it would be a bit confusing to have SimpleHttpServer and JWebServerLauncher in the same place. So maybe we should look at the existing SimpleHttpServer to see if it in the right place. My main concern with locating JWebServerLauncher in the lib tree is that I don't have a good feel yet what tests might want an out-of-process HTTP server. Multi-VM tests have historically been problematic and I would expect an in-process HTTP server to work best for most tests that need a HTTP server. No issue with refactoring MaxRequestTimeTest to split out the launching of jwebserver, it's mostly a question of whether putting this in the lib tree is the right thing or not.
-------------
PR: https://git.openjdk.org/jdk/pull/9232
More information about the net-dev
mailing list