diff --git a/FWCore/Framework/test/eventprocessor2_t.cppunit.cc b/FWCore/Framework/test/eventprocessor2_t.cppunit.cc index d711d59c54558..b667ed6ccb364 100644 --- a/FWCore/Framework/test/eventprocessor2_t.cppunit.cc +++ b/FWCore/Framework/test/eventprocessor2_t.cppunit.cc @@ -15,6 +15,8 @@ Test of the EventProcessor class. #include "FWCore/PluginManager/interface/standard.h" #include "FWCore/ParameterSetReader/interface/ParameterSetReader.h" +#include "tbb/global_control.h" + // to be called also by the other cppunit... void doInit() { static bool firstTime = true; @@ -32,8 +34,13 @@ class testeventprocessor2 : public CppUnit::TestFixture { CPPUNIT_TEST(eventprocessor2Test); CPPUNIT_TEST_SUITE_END(); + edm::propagate_const> m_control; + public: void setUp() { + if (not m_control) { + m_control = std::make_unique(tbb::global_control::max_allowed_parallelism, 1); + } //std::cout << "setting up testeventprocessor2" << std::endl; doInit(); } diff --git a/FWCore/Framework/test/eventprocessor_t.cppunit.cc b/FWCore/Framework/test/eventprocessor_t.cppunit.cc index 391c099b61d64..554b04f670f54 100644 --- a/FWCore/Framework/test/eventprocessor_t.cppunit.cc +++ b/FWCore/Framework/test/eventprocessor_t.cppunit.cc @@ -23,6 +23,8 @@ Test of the EventProcessor class. #include "cppunit/extensions/HelperMacros.h" +#include "tbb/global_control.h" + #include #include @@ -47,6 +49,9 @@ class testeventprocessor : public CppUnit::TestFixture { public: void setUp() { //std::cout << "setting up testeventprocessor" << std::endl; + if (not m_control) { + m_control = std::make_unique(tbb::global_control::max_allowed_parallelism, 1); + } doInit(); m_handler = std::make_unique(); // propagate_const has no reset() function sleep_secs_ = 0; @@ -63,6 +68,7 @@ class testeventprocessor : public CppUnit::TestFixture { private: edm::propagate_const> m_handler; + edm::propagate_const> m_control; void work() { //std::cout << "work in testeventprocessor" << std::endl; std::string configuration(