-
Notifications
You must be signed in to change notification settings - Fork 14
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
DM-41750: Fix some problems with global state in tests #908
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #908 +/- ##
==========================================
- Coverage 87.45% 87.30% -0.15%
==========================================
Files 286 286
Lines 37144 37162 +18
Branches 7828 7833 +5
==========================================
- Hits 32485 32446 -39
- Misses 3474 3519 +45
- Partials 1185 1197 +12 ☔ View full report in Codecov by Sentry. |
timj
force-pushed
the
tickets/DM-41750
branch
from
November 21, 2023 20:29
eae9e64
to
69e2382
Compare
andy-slac
approved these changes
Nov 21, 2023
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.
Looks good, one minor comment.
python/lsst/daf/butler/registry/queries/expressions/parser/parserYacc.py
Show resolved
Hide resolved
timj
force-pushed
the
tickets/DM-41750
branch
from
November 21, 2023 23:26
bdb07a8
to
9ef55aa
Compare
This prevents problems if other tests have reset the lsst logger level since it forces the lsst logger into the right state for log capture.
Some other test may have configured a global log handler to emit logs to stdout instead of stderr
Python 3.12 insists on using these so the parser has to also be updated to strip the +00:00 before astropy parses it.
3.12 wants to use datetime.UTC but that is not part of 3.10.
The metrics test repo code was creating storage classes with the same names as those defined in the test storage class YAML. Unfortunately these definitions were slightly different and test ordering could affect which definition was used. Furthermore, these manually created storage classes were not created as special subclasses of StorageClass (unlike those from configs) and so inheritFrom specifications in the YAML file were not working properly since they all ended up inheriting from the StorageClass base class and losing properties. Ideally the test repo code would use the YAML definitions directly.
The S3 tests were all sharing the same temp directory previously and since files were not being cleaned up the test order changing could make some tests fail.
timj
force-pushed
the
tickets/DM-41750
branch
from
November 22, 2023 04:14
9ef55aa
to
869a33c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sometimes tests would fail depending on what other tests have already run.
Checklist
doc/changes