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

[BUG] Non-deterministic test failures in fn-matches.re #37

Open
alanpaxton opened this issue May 25, 2023 · 0 comments
Open

[BUG] Non-deterministic test failures in fn-matches.re #37

alanpaxton opened this issue May 25, 2023 · 0 comments

Comments

@alanpaxton
Copy link
Contributor

Describe the bug

Some number of tests in this test set fail (fn-matches.re) when the suite is run as a whole.

re00063 Failure Expected: 'AssertTrue', but query returned an error: QueryError(FORX0002,err:FORX0002 Invalid regular expression: Syntax error at char 9 in regular expression: Unknown Unicode block: BasicLatin [at line 1, column 43, source: String/3859996392143586125])junit.framework.AssertionFailedError: Expected: 'AssertTrue', but query returned an error: QueryError(FORX0002,err:FORX0002 Invalid regular expression: Syntax error at char 9 in regular expression: Unknown Unicode block: BasicLatin [at line 1, column 43, source: String/3859996392143586125])at org.exist.xqts.runner.JUnitResultsSerializerActor.$anonfun$formatJunitTestSet$6(JUnitResultsSerializerActor.scala:147)at org.exist.xqts.runner.JUnitResultsSerializerActor.$anonfun$formatJunitTestSet$6$adapted(JUnitResultsSerializerActor.scala:134)at scala.collection.immutable.List.foreach(List.scala:333)at org.exist.xqts.runner.JUnitResultsSerializerActor.$anonfun$formatJunitTestSet$1(JUnitResultsSerializerActor.scala:134)at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)at cats.effect.IOFiber.runLoop(IOFiber.scala:262)at cats.effect.IOFiber.execR(IOFiber.scala:1319)at cats.effect.IOFiber.run(IOFiber.scala:118)at cats.effect.unsafe.WorkerThread.run(WorkerThread.scala:555) 0.007
re00061 Failure Expected: 'AssertTrue', but query returned an error: QueryError(FORX0002,err:FORX0002 Invalid regular expression: Syntax error at char 9 in regular expression: Unknown Unicode block: BasicLatin [at line 1, column 43, source: String/-8379167466134022914])junit.framework.AssertionFailedError: Expected: 'AssertTrue', but query returned an error: QueryError(FORX0002,err:FORX0002 Invalid regular expression: Syntax error at char 9 in regular expression: Unknown Unicode block: BasicLatin [at line 1, column 43, source: String/-8379167466134022914])at org.exist.xqts.runner.JUnitResultsSerializerActor.$anonfun$formatJunitTestSet$6(JUnitResultsSerializerActor.scala:147)at org.exist.xqts.runner.JUnitResultsSerializerActor.$anonfun$formatJunitTestSet$6$adapted(JUnitResultsSerializerActor.scala:134)at scala.collection.immutable.List.foreach(List.scala:333)at org.exist.xqts.runner.JUnitResultsSerializerActor.$anonfun$formatJunitTestSet$1(JUnitResultsSerializerActor.scala:134)at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)at cats.effect.IOFiber.runLoop(IOFiber.scala:262)at cats.effect.IOFiber.execR(IOFiber.scala:1319)at cats.effect.IOFiber.run(IOFiber.scala:118)at cats.effect.unsafe.WorkerThread.run(WorkerThread.scala:555)

Expected behavior
All tests should pass.

To Reproduce

The entry in my VSCode launch.json
{
"type": "scala",
"request": "launch",
"name": "XQTS fn:matches.re",
"mainClass": "org.exist.xqts.runner.XQTSRunner",
"args": ["--xqts-version", "HEAD", "--test-set", "fn-matches.re"],
"jvmOptions": [],
"env": {}
},

For clarity I have been testing against the code at eXist-db/exist#4900, but the behaviour does not seem
dependent on the change.

All (intermittently failing) tests succeed when run individually:

    {
        "type": "scala",
        "request": "launch",
        "name": "XQTS fn:matches.re-single",
        "mainClass": "org.exist.xqts.runner.XQTSRunner",
        "args": ["--xqts-version", "HEAD", "--test-set", "fn-matches.re", "--test-case", "re00063"],
        "jvmOptions": [],
        "env": {}
    },

(note that re00063 is one that often fails in this context)

Context (please always complete the following information):

  • OS: macOS 13.3.1
  • eXist-db Version: 7-0-0.SNAPSHOT (see above for details)
  • Java Version: java version "17.0.6" 2023-01-17 LTS
  • App Version: commit 21abfbb (1.4.0-SNAPSHOT)

Additional context

  • How is eXist-db installed? Development build
  • Any custom changes - it's complicated
  • This ticket is primarily intended as a record of the behaviour for future reference; it's not impossible that the problem is truly a genuine concurrent/non-deterministic issue in Saxon.
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

No branches or pull requests

1 participant