-
-
Notifications
You must be signed in to change notification settings - Fork 179
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
Fix bugs in XQSuite and XQuery tests written for XQSuite #4622
Fix bugs in XQSuite and XQuery tests written for XQSuite #4622
Conversation
b33fa3a
to
13f1522
Compare
13f1522
to
767239a
Compare
Please have a look at the test failures. |
767239a
to
80283bc
Compare
@line-o All tests are now passing. |
What about the error in Deploy / Build and Test Images? |
@line-o I don't know what the Bats tests do and I don't understand them. Any idea who added them and/or what they do? |
They test the docker container. In this case https://github.com/eXist-db/exist/actions/runs/3574037174/jobs/6008812699#step:11:12 if the logs are free of errors on startup. They are not in this branch |
Okay thanks @duncdrum, do you know where I can see the logs? |
@adamretter simply build and run the container and see what it pipes to console, or download exist.log |
@duncdrum Unless I am mistaken the |
I built a Docker image locally, and it does indeed show that there was a hidden XQuery error in Monex which is shown by the fixes in this PR:
Seems we will also need to fix Monex and get a new release of that out... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since one of the bundled applications seems to choke on the changes in this PR we need to investigate first if other packages might also be affected.
related to #4632 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please have a look at the comments.
exist-core/src/main/resources/org/exist/xquery/lib/xqsuite/xqsuite.xql
Outdated
Show resolved
Hide resolved
extensions/modules/mail/src/main/java/org/exist/xquery/modules/mail/MailStoreFunctions.java
Outdated
Show resolved
Hide resolved
Regarding problems with bundled applications: the necessity of commit a1a35e0 indicates that there might be more problems after this PR is merged. |
This PR contains several - welcome and good - changes that would warrant their own separate PRs. The risk is that we accidentally create more harm than we solve. |
@line-o I am afraid that is not specific to this PR. That is just a general statement that: whenever we modify eXist-db's XQuery engine to be more spec compliant, then it is likely that any code that relied on behaviour that is not spec compliant will need to be fixed. This has been true for every XQuery change to eXist-db, and does not relate specifically to this PR. This change, just like any other PR that changes eXist-db's XQuery compliance in a non-compatible way, is scheduled for a major release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is still an open question on the adaptive serialization test where the expected value changed from a string to a number literal.
I would like to have proof that XQsuite is able to assert a string '1234' was returned.
@line-o As I tried to explain above there is a sequence of operations that happens. This test is not only testing that a specific string is returned from
I hope that helps explain the purpose of this test (which I think is the thing that is not being understood here). To summarise - it covers both the
That is already present on that test, both implicitly through the explanation above that uses: %test:args(1234)
%test:assertEquals(1234) and also explicitly by the additional assertions on the same function under test: %test:args('Hello "world"!')
%test:assertEquals('"Hello ""world""!"') Additionally... I think you are already aware of many tests, including some written by yourself, within the full XQSuite of tests that already cover that use-case. |
The two tests in question do test the raw output of serialize (they are part of the spec of our implementation of declare
%test:args(1234)
%test:assertEquals(1234)
%test:args('Hello "world"!')
%test:assertEquals('"Hello ""world""!"')
function ser:adaptive-simple-atomic($atomic as xs:anyAtomicType) {
ser:adaptive($atomic)
};
declare
%test:args(1234)
%test:assertEquals(1234)
%test:args('Hello "world"!')
%test:assertEquals('"Hello ""world""!"')
function ser:adaptive-simple-atomic-map-params($atomic as xs:anyAtomicType) {
ser:adaptive-map-params($atomic)
}; |
I am afraid @line-o that you are still missing the point of my changes. I am not sure how I can explain them any better, as I have tried several times now. Perhaps someone else could assist here? So... Yes,
However, that's not the point of these additions that I have made. As I said above:
Can we please move on? |
The test are for |
@line-o I can not see a problem with the changes from @adamretter here. In my opinion the fix is as much as important as the test. As I understand it your requirements where covered as explained by Adam earlier. I see no point of changing the tests again. |
@reinhapa a test that has to ensure the function under test returns the expected value and type. |
Let's proceed as discussed in the call here...
…anValue fails Closes eXist-db#4612
…ic, rather it is implicitly a member by the fact that it is a sub-type of xs:decimal (which is a direct member)
…ation literal value
…notation to an XDM value type
…Equals annotation to an XDM value type
…tests results in XSuite output
…sertEqualsPermutation
…correctly mixing xs:integer and xs:long for handles, should be xs:long
edab247
to
0c66292
Compare
SonarCloud Quality Gate failed. |
Closes #4612
Unfortunately fixing a number of bugs in XQSuite has revealed: