On Wed, 22 Jun 2022 07:44:34 GMT, Jaikiran Pai <[email protected]> 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

Changes requested by dfuchs (Reviewer).

test/lib/jdk/test/lib/net/JWebServerLauncher.java line 55:

> 53:      * @param processOutput The server's stdout and stderr output
> 54:      */
> 55:     public record JWebServerProcess(Process process, InetSocketAddress 
> serverAddr,

Maybe JWebServerProcess could be AutoCloseable (where close() would destroy the 
process), which would make it possible to use it in a try-with-resource block?

-------------

PR: https://git.openjdk.org/jdk/pull/9232

Reply via email to