-
Notifications
You must be signed in to change notification settings - Fork 16
test: check limit().evaluate() #315
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
base: main
Are you sure you want to change the base?
Conversation
I added an integration test for this case in this PR: It works as of now and I could not reproduce. The arithmetic happens on the server side so need to do the query. Please modify the integration tests to trigger the error as it would help fix the issue. It seems there is some kind of corner case that triggers your issue, but I can't understand why or reproduce at the moment. With the integration test in place, it should be easier to boil it down hopefully. The integration test for it is called "Test simple arithmetic with vars variable handling", there is an equivalent with the string variable handling. Thanks for your efforts, let's squash it! |
The test you provided is not evaluated by the server and should thus look like this. Happy to pull in the test to ensure correct WOQL evaluation. This is the same WOQL as in the integration test.
Let's try to find a reproducible case for how the incorrect WOQL with Value is generated. |
@hoijnet I moved my answer to (original) issue, because there is full description a bug, but PR is only add test. |
The issue is that the test is incorrect, as it is never executed; it needs to be queries from the server to get a correct response. Please look at the test added in #316 for reference. Does it make sense to you too? |
@hoijnet What do you mean "it is never executed"? 🤔 The test is definitely executed and fails with an error that the corresponding evaluate() method on the limit object was not found (same error from dashboard):
Or I don't understand correctly
How do all the other similar tests in this file work then? |
Realise I didn't write the full throught. In essence, two things here:
So what the .json() produces is only on the client side, it needs to be processed by terminusdb to yield the result you look for. |
Test for terminusdb/terminusdb#2155