add TestProcessor based tests for ScoutingCollectionMonitor#50907
Conversation
|
type ngt |
|
cms-bot internal usage |
|
@sakura-ngt FYI |
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-50907/49268
|
|
A new Pull Request was created by @mmusich for master. It involves the following packages:
@Martin-Grunewald, @cmsbuild, @ctarricone, @gabrielmscampos, @mmusich, @nothingface0, @rseidita can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
|
test parameters:
|
|
@cmsbuild, please test |
|
-1 Failed Tests: RelVals Failed RelVals |
|
test parameters:
|
|
@cmsbuild, please test |
|
+1 Size: This PR adds an extra 40KB to repository Comparison SummarySummary:
|
|
+dqm |
|
+hlt |
|
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @sextonkennedy, @ftenchini, @mandrenguyen (and backports should be raised in the release meeting by the corresponding L2) |
|
+1 |
PR description:
This PR is a follow-up to #50871 which stems from #50866.
This PR introduces a Catch2 test suite for
ScoutingCollectionMonitorand improves the robustness of theedm::ValueMapretrieval in theanalyze()method.I provide
TestProcessor-based tests that make sure there are no crashes when we run with missing input.The Catch2 test binary is added with two test cases:
"ScoutingCollectionMonitor"tests: exercises the standard lifecycle methods (testWithNoRuns,testBeginAndEndJobOnly,test,testRunWithNoLuminosityBlocks,testLuminosityBlockWithNoEvents) using the default_cficonfiguration."ScoutingCollectionMonitor invalid beamspot": specifically targets the code path where the beamspot handle is invalid. Sinceanalyze()returns early when any mandatory collection handle is missing, all mandatory collections (muons, electrons, photons, PF jets, PF candidates, tracks, vertices, MET, rho, and all twelve electron best-track ValueMaps) are supplied as empty or default-constructed objects viaTestProcessor::put, while the beamspotInputTagis pointed at a non-existent label. This verifies that the beamspot-guarded histogram fills (tk_BS_dxy,tk_BS_dz,trkd0BS,trkdzBS) are correctly skipped without crashing.PR validation:
Run successfully the following unit tests:
If this PR is a backport please specify the original PR and why you need to backport that PR. If this PR will be backported please specify to which release cycle the backport is meant for:
Not a backport, to be backported down to
CMSSW_16_0_X.