-
Bug
-
Resolution: Fixed
-
P4
-
11
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8309987 | 11.0.21 | Christoph Langer | P4 | Resolved | Fixed | b01 |
The test 'tools/jmod/hashes/HashesOrderTest.java', introduced by JDK-8240903, was backported to 11.0.17 via JDK-8287791. However, JDK11 doesn't support specifying "--date". This appears to be needed in order to make the test reliable. The hashes of two jmod files may differ if the timestamp differs.
The "--date" option was implemented withJDK-8276766 for JDK 19 and has only been backported to JDK 17. It is a feature that comes with a CSR and might not be worthwile doing for the JDK11 updates release. For now, the test should be marked as @intermittent until JDK-8276766 is brought to JDK11 updates.
jmod create --class-path mods/m63b lib2/m63b.jmod
jmod create --module-path lib1 --hash-modules .* --class-path mods/ma lib1/ma.jmod
jmod create --module-path lib2 --hash-modules .* --class-path mods/ma lib2/ma.jmod
test HashesOrderTest.test(): failure
java.lang.AssertionError: expected [-1] but found [14]
at org.testng.Assert.fail(Assert.java:99)
at org.testng.Assert.failNotEquals(Assert.java:1037)
at org.testng.Assert.assertEqualsImpl(Assert.java:140)
at org.testng.Assert.assertEquals(Assert.java:122)
at org.testng.Assert.assertEquals(Assert.java:797)
at org.testng.Assert.assertEquals(Assert.java:807)
at HashesOrderTest.test(HashesOrderTest.java:91)
The "--date" option was implemented with
jmod create --class-path mods/m63b lib2/m63b.jmod
jmod create --module-path lib1 --hash-modules .* --class-path mods/ma lib1/ma.jmod
jmod create --module-path lib2 --hash-modules .* --class-path mods/ma lib2/ma.jmod
test HashesOrderTest.test(): failure
java.lang.AssertionError: expected [-1] but found [14]
at org.testng.Assert.fail(Assert.java:99)
at org.testng.Assert.failNotEquals(Assert.java:1037)
at org.testng.Assert.assertEqualsImpl(Assert.java:140)
at org.testng.Assert.assertEquals(Assert.java:122)
at org.testng.Assert.assertEquals(Assert.java:797)
at org.testng.Assert.assertEquals(Assert.java:807)
at HashesOrderTest.test(HashesOrderTest.java:91)
- backported by
-
JDK-8309987 [11u] tools/jmod/hashes/HashesOrderTest.java fails intermittently
-
- Resolved
-
- relates to
-
JDK-8240903 Add test to check that jmod hashes are reproducible
-
- Resolved
-
-
JDK-8276766 Enable jar and jmod to produce deterministic timestamped content
-
- Resolved
-
-
JDK-8287791 Add test to check that jmod hashes are reproducible
-
- Resolved
-
(1 links to)