Closed ansell closed 5 years ago
I have a recollection of adding something for "Before Year", and then removing it because I was unclear on the semantics (its a value in use by NBN UK only i think). I cant see a test that references it.
The tests all pass for me (and travis). Sorry if ive missed a detail here...
I figured out the behaviour difference. In the debugger, the datePrecision.txt
file from https://github.com/AtlasOfLivingAustralia/biocache-store/blob/master/src/main/resources/datePrecision.txt was used, as expected. Outside of the debugger, an old file deployed by ansible/ala-install at some point in the past to /data/biocache/config/vocab/dataPrecision.txt
on the file system was being used, which did have Before Year
in it.
I am not familiar with the way any of the run configurations or biocache-store tests (or Scala in general) choose between the file system and the classpath, but this may happen again to someone in the future. Closing this now, but will reopen if I figure out what the bug in the choice mechanism may be so at least everything runs the same on a single computer in and out of debugger mode.
To clarify, this wasn't on the master branch, this is on my branch for date refactoring.
The commit where Before Year
was removed was relatively recent in July https://github.com/AtlasOfLivingAustralia/biocache-store/commit/0398df452abd311a0463c6d4a4b4e8449bc93f6d
The
DatePrecisionTest
functions different in a debugger than out of a debugger. While testing date refactoring, unable to replicate the results of a test failure outside of the debugger compared to inside it. Opening this as a tracking issue, although it may still be related to the refactoring.Outside of the debugger the following unexpected canonical values for datePrecision are found for the 'y' test, but not for the 'year' test:
The code added to
EventProcessor.checkPrecision
to generate this output was the following. The tests fail with or without the logging:If anyone has any experience with this code to shed light on where to follow up debugging the unexpected
Before Year
value it would be great, as that value doesn't appear to be in any of the source files for biocache-store.