Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failures with OpenJDK 21 #632

Open
jamesjer opened this issue Sep 8, 2024 · 1 comment · May be fixed by #635
Open

Test failures with OpenJDK 21 #632

jamesjer opened this issue Sep 8, 2024 · 1 comment · May be fixed by #635

Comments

@jamesjer
Copy link

jamesjer commented Sep 8, 2024

Attempting to build flexmark-java with OpenJDK 21 on an x86_64 Fedora 40 machine leads to test failures. OpenJDK 17 and earlier work. This is the first test failure:

[INFO] Running com.vladsch.flexmark.ext.abbreviation.ComboAbbreviationSpecTest
[ERROR] Tests run: 22, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.085 s <<< FAILURE! -- in com.vladsch.flexmark.ext.abbreviation.ComboAbbreviationSpecTest
[ERROR] com.vladsch.flexmark.ext.abbreviation.ComboAbbreviationSpecTest.testSpecExample[Full Spec] -- Time elapsed: 0.055 s <<< FAILURE!
org.junit.ComparisonFailure: 
file:///builddir/build/BUILD/flexmark-java-0.64.6-build/flexmark-java-0.64.6/flexmark-ext-abbreviation/src/test/resources/ext_abbreviation_ast_spec.md expected:<...ca">U.S.A.</abbr>, ([<abbr title="États-Unis d'Amérique">É.U.</abbr> or É.-U. d&rsquo;A. in French).</p>
<p>And here we have a <abbr title="Compact Disk">CD</abbr>, some CDs, and some other <abbr title="Compact Disk">CD</abbr>&rsquo;s.</p>
<p>Let&rsquo;s transfert documents through <abbr title="Transmission Control Protocol">TCP</abbr>/<abbr title="Internet Protocol">IP</abbr>, using <abbr title="Transmission Control Protocol">TCP</abbr> packets.</p>
.
Document[0, 535]
  Paragraph[0, 38] isTrailingBlankLine
    TextBase[0, 37] chars:[0, 37, "Some  … TML4."]
      Text[0, 16] chars:[0, 16, "Some  … bout "]
      Abbreviation[16, 20] chars:[16, 20, "HTML"]
      Text[20, 22] chars:[20, 22, ", "]
      Abbreviation[22, 26] chars:[22, 26, "SGML"]
      Text[26, 31] chars:[26, 31, " and "]
      Abbreviation[31, 36] chars:[31, 36, "HTML4"]
      Text[36, 37] chars:[36, 37, "."]
  Paragraph[39, 100] isTrailingBlankLine
    Text[39, 42] chars:[39, 42, "Let"]
    TypographicSmarts[42, 43] typographic: &rsquo; 
    TextBase[43, 84] chars:[43, 84, "s tal … -U. d"]
      Text[43, 60] chars:[43, 60, "s tal …  the "]
      Abbreviation[60, 66] chars:[60, 66, "U.S.A."]
      Text[66, 69] chars:[66, 69, ", ("]
      Abbreviation[69, 73] chars:[69, 73, "É.U."]
      Text[73, 84] chars:[73, 84, " or É] … -U. d"]
    Typog...> but was:<...ca">U.S.A.</abbr>, ([É.U. or É.-U. d&rsquo;A. in French).</p>
<p>And here we have a <abbr title="Compact Disk">CD</abbr>, some CDs, and some other <abbr title="Compact Disk">CD</abbr>&rsquo;s.</p>
<p>Let&rsquo;s transfert documents through <abbr title="Transmission Control Protocol">TCP</abbr>/<abbr title="Internet Protocol">IP</abbr>, using <abbr title="Transmission Control Protocol">TCP</abbr> packets.</p>
.
Document[0, 535]
  Paragraph[0, 38] isTrailingBlankLine
    TextBase[0, 37] chars:[0, 37, "Some  … TML4."]
      Text[0, 16] chars:[0, 16, "Some  … bout "]
      Abbreviation[16, 20] chars:[16, 20, "HTML"]
      Text[20, 22] chars:[20, 22, ", "]
      Abbreviation[22, 26] chars:[22, 26, "SGML"]
      Text[26, 31] chars:[26, 31, " and "]
      Abbreviation[31, 36] chars:[31, 36, "HTML4"]
      Text[36, 37] chars:[36, 37, "."]
  Paragraph[39, 100] isTrailingBlankLine
    Text[39, 42] chars:[39, 42, "Let"]
    TypographicSmarts[42, 43] typographic: &rsquo; 
    TextBase[43, 84] chars:[43, 84, "s tal … -U. d"]
      Text[43, 60] chars:[43, 60, "s tal …  the "]
      Abbreviation[60, 66] chars:[60, 66, "U.S.A."]
      Text[66, 84] chars:[66, 84, ", (É.] … -U. d"]
    Typog...>
	at org.junit.Assert.assertEquals(Assert.java:117)
	at com.vladsch.flexmark.test.util.FullSpecTestCase.testSpecExample(FullSpecTestCase.java:48)
	at com.vladsch.flexmark.test.util.ComboSpecTestCase.testSpecExample(ComboSpecTestCase.java:100)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:61)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:258)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:316)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:240)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:214)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:155)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
	at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
@jamesjer
Copy link
Author

Any thoughts on how to debug this issue would be very welcome, as Fedora is moving toward dropping all JDKs prior to OpenJDK 21.

mizdebsk added a commit to mizdebsk/flexmark-java that referenced this issue Sep 25, 2024
In order for regex \b character class to match non-ASCII characters
the UNICODE_CHARACTER_CLASS flag must be passed to regex compiler.

See https://bugs.openjdk.org/browse/JDK-8291577

Fixes vsch#632
@mizdebsk mizdebsk linked a pull request Sep 25, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant