JDK-8326503 : [11u] java/net/HttpURLConnection/HttpURLConnectionExpectContinueTest.java fail because of package org.junit.jupiter.api does not exist
  • Type: Bug
  • Component: core-libs
  • Affected Version: 11.0.23
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2024-02-22
  • Updated: 2024-07-30
  • Resolved: 2024-02-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11
11.0.23 b05Fixed
Related Reports
Duplicate :  
Relates :  
Sub Tasks
JDK-8326564 :  
Description
java/net/HttpURLConnection/HttpURLConnectionExpectContinueTest.java fail because of package org.junit.jupiter.api does not exist

/home/yansendao/git/jdk11u-dev/test/jdk/java/net/HttpURLConnection/HttpURLConnectionExpectContinueTest.java:32: error: package org.junit.jupiter.api does not exist
import org.junit.jupiter.api.AfterAll;
                            ^
/home/yansendao/git/jdk11u-dev/test/jdk/java/net/HttpURLConnection/HttpURLConnectionExpectContinueTest.java:33: error: package org.junit.jupiter.api does not exist
import org.junit.jupiter.api.BeforeAll;


The jtreg version is 6:  
jtreg 6.1-dev+0
Installed in /home/yansendao/software/jdk/jtreg-6/lib/jtreg.jar
Running on platform version 11.0.22.17 from /home/yansendao/software/jdk/2024-02/dragonwell-11.0.21.17+9-GA.
Built with Java(TM) 2 SDK, Version 1.8.0_312-b07 on April 22, 2022.
Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
Use is subject to license terms.
JT Harness, version 6.0 ea b14 (April 22, 2022)
JCov 3.0-2
Java Assembler Tools, version 7.0 ea b09 (April 22, 2022)
TestNG (testng.jar): version 7.3.0
TestNG (jcommander.jar): version unknown
TestNG (guice.jar): version 4.2.3
JUnit (junit.jar): version 4.13.2
JUnit (hamcrest.jar): version 2.2


When change jtreg version from 6 to 7, then this testcase run success:
jtreg 7.3.1-dev+0
Installed in /home/yansendao/software/jdk/jtreg-7/lib/jtreg.jar
Running on platform version 11.0.22.17 from /home/yansendao/software/jdk/2024-02/dragonwell-11.0.21.17+9-GA.
Built with Java(TM) 2 SDK, Version 11.0.13+8 on September 12, 2023.
Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
Use is subject to license terms.
JT Harness, version 6.0 ea b24 (September 12, 2023)
Java Assembler Tools, version 7.0 ea b09 (September 12, 2023)
TestNG: testng-7.3.0.jar, guice-5.1.0.jar, jcommander-1.82.jar
JUnit: junit-platform-console-standalone-1.9.2.jar
```


Should jdk11u should use jtreg7?


If I use jtreg7 instead of jtreg6 to run all the testcases of jdk11u-dev, there are 424 testcases fail.
There are a total of 2 types failure:
1.javax/xml/jaxp testcases fail because of `java.security.AccessControlException: access denied (“java.util.PropertyPermission” “testng.thread.affinity” “read”)`
2. 5 tools/javac testcases fails, such as tools/javac/6257443/T6257443.java, the fail message is: `Error. Parse Exception: Bad classname provided for `clean’: foo.package-info`
Comments
Changeset: 93c5f7c5 Author: Anton Bobrov <abobrov@openjdk.org> Committer: Severin Gehwolf <sgehwolf@openjdk.org> Date: 2024-02-26 15:50:06 +0000 URL: https://git.openjdk.org/jdk11u/commit/93c5f7c50d2300d45c8d7789cdb22775fc6fb7b0
27-02-2024

Changeset: 93c5f7c5 Author: Anton Bobrov <abobrov@openjdk.org> Committer: Severin Gehwolf <sgehwolf@openjdk.org> Date: 2024-02-26 15:50:06 +0000 URL: https://git.openjdk.org/jdk11u-dev/commit/93c5f7c50d2300d45c8d7789cdb22775fc6fb7b0
26-02-2024

Approved for JDK 11u. We might need to reconsider the fix once (if?) we have jtreg 7 for 11u.
26-02-2024

[jdk11u-fix-request] Approval Request from Anton Bobrov this needs to land asap to avoid test failures with older jtreg 6.1 in 11u
26-02-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk11u-dev/pull/2553 Date: 2024-02-26 10:39:20 +0000
26-02-2024

Hi [~syan], I already opened JDK-8326549 for this. Please add [11u] to the title of this bug and close one of the two as duplicate. Switching to jtreg 7.1 (or better 7.3.1) is not an option before start of rampdown on 27.2., but this needs to be fixed before that. So your approach is ok.
23-02-2024