Skip to content

Commit

Permalink
Merge pull request #36210 from mmusich/updateNamingOftestAlCaHarvesting
Browse files Browse the repository at this point in the history
update naming of output file of `testAlCaHarvesting` to avoid concurrency issues
  • Loading branch information
cmsbuild authored Nov 23, 2021
2 parents d145f63 + 19425e7 commit fb2249f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
9 changes: 5 additions & 4 deletions Calibration/TkAlCaRecoProducers/test/parseFwkJobReport.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
TARGET_DQM_FILES=1
TARGET_DQM_FILENAME='./DQM_V0001_R000325022__Express__PCLTest__ALCAPROMPT.root'
TARGET_DB_FILES=12
TARGET_DB_FILENAME='sqlite_file:promptCalibConditions.db'
TARGET_DB_FILENAME='sqlite_file:testPCLAlCaHarvesting.db'
TARGET_XML_FILENAME='testPCLAlCaHarvesting.xml'
TOTAL_TARGET_FILES=TARGET_DQM_FILES+TARGET_DB_FILES

#_____________________________________________________
Expand Down Expand Up @@ -67,13 +68,13 @@ def parseXML(xmlfile):
#_____________________________________________________
def main():
try:
f = open("FrameworkJobReport.xml")
f = open(TARGET_XML_FILENAME)
except IOError:
print("FrameworkJobReport.xml is not accessible")
print("%s is not accessible" % TARGET_XML_FILENAME)
sys.exit(1)

# parse xml file
result = parseXML('FrameworkJobReport.xml')
result = parseXML(TARGET_XML_FILENAME)
if(result==0):
print("All is fine with the world!")
sys.exit(0)
Expand Down
3 changes: 2 additions & 1 deletion Calibration/TkAlCaRecoProducers/test/testAlCaHarvesting.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ function cleanTheHouse {
rm -fr millepede.*
rm -fr pede*
rm -fr treeFile.root
rm -fr testPCLAlCaHarvesting.db
}

echo "TESTING Calibration/TkAlCaRecoProducers ..."
cmsRun -e ${LOCAL_TEST_DIR}/testPCLAlCaHarvesting.py || die "Failure running testPCLAlCaHarvesting.py" $?
cmsRun -e -j testPCLAlCaHarvesting.xml ${LOCAL_TEST_DIR}/testPCLAlCaHarvesting.py || die "Failure running testPCLAlCaHarvesting.py" $?
cleanTheHouse
echo "PARSING Framework Job Report ..."
python ${LOCAL_TEST_DIR}/parseFwkJobReport.py
5 changes: 5 additions & 0 deletions Calibration/TkAlCaRecoProducers/test/testPCLAlCaHarvesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ def findRunStopTime(run_number):
process.PoolDBOutputService.toPut.append(process.ALCAHARVESTBeamSpotHPByRun_dbOutput)
process.PoolDBOutputService.toPut.append(process.ALCAHARVESTBeamSpotHPByLumi_dbOutput)

##
## change the output sqlite file in order to avoid concurrent writing from other unit tests
##
process.PoolDBOutputService.connect = cms.string('sqlite_file:testPCLAlCaHarvesting.db')

##
## Define the file metadatas
##
Expand Down

0 comments on commit fb2249f

Please sign in to comment.