Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Even more query tests #59

Merged
merged 17 commits into from
Sep 25, 2022
Merged

Even more query tests #59

merged 17 commits into from
Sep 25, 2022

Conversation

Du-z
Copy link
Collaborator

@Du-z Du-z commented Sep 25, 2022

Split the query tests into their own files
Added Date and Enum query tests (6 failing)
Added a few more type to RoundTripObject

@Du-z Du-z force-pushed the more_query_tests_2 branch from b342cc1 to 0a4b045 Compare September 25, 2022 11:57
Copy link
Collaborator

@ProphetLamb ProphetLamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The InequalityQueryTests.GreaterThanOrEqualToQueryTest fails for timespan, with

SELECT * FROM ($val1 >= $val2)
$val1=$val1="1.00:00:00

which returns true, but false is expected according to the test. This is because the expected calculation is defined as exclusive greater, not greater equals

(dynamic)val1! > (dynamic)val2!

@ProphetLamb
Copy link
Collaborator

The remaining failing tests execute with no issues in Debug mode, I suspect the errors are somehow related to testcase-isolation

@ProphetLamb
Copy link
Collaborator

If I re-run failed tests, the failing tests finish successfully...

@ProphetLamb
Copy link
Collaborator

Test logging shows that the Database is not reset after each testcase :(

exp: {"Key":69021859,"Value":"1d0h0m0s0ms"}
rsp: OK: [{"Key":69021859,"Value":"1d0h0m0s0ms","id":"object:69021859"},{"Key":983674740,"Value":"1d0h0m0s0ms","id":"object:983674740"}]

@ProphetLamb
Copy link
Collaborator

Implementing IDisposable object, that will be used as a database hande, to blocks while a database is already running, and explicitly kills the db after Disposed should solve this issue.

using DbHandle<T> h = new();
d.Database.Create([...]);
d.Database.Query([...]);

Is there any easier method, I am missing?

@ProphetLamb
Copy link
Collaborator

The duplicate item in the REST tests are artifacts from the RPC test. The db doesn't seem to reset in between

@ProphetLamb
Copy link
Collaborator

The unittests are now fully isolated, one tests still fails

@ProphetLamb
Copy link
Collaborator

As always, thanks a lot for the testcases! We will get to the 80% coverage soon^^

@ProphetLamb ProphetLamb merged commit 74884a4 into master Sep 25, 2022
@ProphetLamb ProphetLamb deleted the more_query_tests_2 branch September 25, 2022 17:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants