Integrated: 8330523: Reduce runtime and improve efficiency of KeepAliveTest

Christoph Langer clanger at openjdk.org
Sat Apr 27 13:14:12 UTC 2024


On Wed, 17 Apr 2024 14:55:02 GMT, Christoph Langer <clanger at openjdk.org> wrote:

> The test case sun/net/www/http/HttpClient/KeepAliveTest.java could be more effective.
> 
> It tests a matrix of HTTP client settings and server behavior, resulting in 160 individual test scenarios. Each is tested in an own freshly spawned JVM via the `@run main/othervm` directive. The need for new VMs is due to the fact that the behavior of the HTTP client is determined at VM initialization and can not be changed later on. However, for each distinct type of client settings, one VM can be reused. This would lead us from 160 JVM instantiations down to 16 which has a factor 10 influence on test runtime.
> 
> E.g. on my developer laptop runtime went down from ~100s to ~10s.
> 
> I also made additional cleanups/refactoring in the test.

This pull request has now been integrated.

Changeset: 16c7dcdb
Author:    Christoph Langer <clanger at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/16c7dcdb04a7c220684a20eb4a0da4505ae03813
Stats:     1230 lines in 1 file changed: 75 ins; 1012 del; 143 mod

8330523: Reduce runtime and improve efficiency of KeepAliveTest

Reviewed-by: djelinski

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

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


More information about the net-dev mailing list