RFR: 8373893: Refactor networking http server tests to use JUnit [v3]

Daniel Jeliński djelinski at openjdk.org
Tue Dec 30 06:49:51 UTC 2025


On Tue, 23 Dec 2025 10:52:05 GMT, Michael McMahon <michaelm at openjdk.org> wrote:

>> test/jdk/com/sun/net/httpserver/UnmodifiableHeadersTest.java line 72:
>> 
>>> 70:     }
>>> 71: 
>>> 72:     public Object[][] headers() {
>> 
>> Could this be changed to return `Stream<Headers>`? Also if method source is changed to be a static method then would it remove the need to use TestInstance.Lifecycle.PER_CLASS?
>
>> Could this be changed to return `Stream<Headers>`? Also if method source is changed to be a static method then would it remove the need to use TestInstance.Lifecycle.PER_CLASS?
> 
> Yes, that works. I will change the other data provider as well.

Could you remove the `TestInstance.Lifecycle.PER_CLASS` annotation from other tests as well?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28908#discussion_r2652343974


More information about the net-dev mailing list