Skip to content

Commit 0baecdd

Browse files
authored
Merge pull request #48125 from Dr15Jones/fixTestSourceProcessor
Release principals in TestSourceProcessor
2 parents 9d0a9df + 8bb925c commit 0baecdd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

FWCore/TestProcessor/src/TestSourceProcessor.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,10 @@ namespace edm::test {
259259
ServiceRegistry::Operate operate(serviceToken_);
260260

261261
//NOTE: should probably handle merging as well
262+
//if there is only one principal, we need to return it to the cache first
263+
runPrincipal_.reset();
262264
runPrincipal_ = principalCache_.getAvailableRunPrincipalPtr();
265+
assert(runPrincipal_);
263266
runPrincipal_->possiblyUpdateAfterAddition(preg_);
264267
runPrincipal_->setAux(*source_->runAuxiliary());
265268
source_->readRun(*runPrincipal_, *historyAppender_);
@@ -276,6 +279,8 @@ namespace edm::test {
276279
//make the services available
277280
ServiceRegistry::Operate operate(serviceToken_);
278281

282+
//if there is only one principal, we need to return it to the cache first
283+
lumiPrincipal_.reset();
279284
lumiPrincipal_ = principalCache_.getAvailableLumiPrincipalPtr();
280285
assert(lumiPrincipal_);
281286
lumiPrincipal_->possiblyUpdateAfterAddition(preg_);

0 commit comments

Comments
 (0)