icatproject / icat.server

The ICAT server offering both SOAP and "RESTlike" interfaces to a metadata catalog.
Other
1 stars 5 forks source link

Use date instead of startDate endDate for DF #264 #268

Closed patrick-austin closed 2 years ago

patrick-austin commented 2 years ago

Have changed TestLucene to encode the Datafile with "date" rather than "startDate" or "endDate". As a result, when getting the results, we now get files 3 through 6. Previously, the query gets files that had both "startDate" and "endDate" in the range now+3 to now+6, so ID6 was not returned as it's end date was now+7. As we now only have one date field which is only precise to a minute, we get ID6 as well.

There was another test which was failing for me in TestRS, which had a TODO saying how the test should pass. Making the change it described worked, however I don't know if this was due to some peculiarity in my local setup (e.g. a weird version of icat.lucene/client) so this may deserve a separate issue?

This now has it's own issue with further discussion: #273 Have removed the changes to TestRS from this PR.

Closes #264

RKrahl commented 2 years ago

I get a new error from the integration tests on the master branch, apparently related to this change:

Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.393 sec <<< FAILURE! - in org.icatproject.core.manager.TestLucene
datafiles(org.icatproject.core.manager.TestLucene)  Time elapsed: 0.875 sec  <<< FAILURE!
java.lang.AssertionError: Missing entries
        at org.junit.Assert.fail(Assert.java:89)
        at org.icatproject.core.manager.TestLucene.checkLsr(TestLucene.java:171)
        at org.icatproject.core.manager.TestLucene.datafiles(TestLucene.java:212)

Running org.icatproject.exposed.TestICATRest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in org.icatproject.exposed.TestICATRest
Running org.icatproject.exposed.parser.TestImportParser
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in org.icatproject.exposed.parser.TestImportParser

Results :

Failed tests: 
  TestLucene.datafiles:212->checkLsr:171 Missing entries

Tests run: 84, Failures: 1, Errors: 0, Skipped: 0
kevinphippsstfc commented 2 years ago

Do you have icat.lucene-1.1.2 (the latest version) installed in your test ICAT stack?

RKrahl commented 2 years ago

Do you have icat.lucene-1.1.2 (the latest version) installed in your test ICAT stack?

No.

RKrahl commented 2 years ago

Ok, sorry for the false alarm: using icat.lucene-1.1.2 anything works fine!