From b7d965dc59e8a13f7daa30eed9ebba920f2491ec Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Mon, 13 Jul 2020 21:02:36 +0200 Subject: [PATCH] TrigServices: A couple fixse to the unit test. - Suppress spurios ubsan warnings. - The internal timeout was frequently being hit in debug builds. Make it a bit longer. --- .../TrigServices/test/test_TrigMessageSvc.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/HLT/Trigger/TrigControl/TrigServices/test/test_TrigMessageSvc.cxx b/HLT/Trigger/TrigControl/TrigServices/test/test_TrigMessageSvc.cxx index d5ba0de4ccf..4ebc8c565ae 100644 --- a/HLT/Trigger/TrigControl/TrigServices/test/test_TrigMessageSvc.cxx +++ b/HLT/Trigger/TrigControl/TrigServices/test/test_TrigMessageSvc.cxx @@ -5,6 +5,9 @@ #include "GaudiKernel/IService.h" #include "GaudiKernel/ISvcLocator.h" +#include "TInterpreter.h" +#include "CxxUtils/ubsan_suppress.h" + #include <random> #include <chrono> #include <cassert> @@ -18,7 +21,9 @@ int main() { using namespace std; ISvcLocator* pSvcLoc; assert(Athena_test::initGaudi(pSvcLoc)); - + + CxxUtils::ubsan_suppress ( []() { TInterpreter::Instance(); } ); + //-------------------------------------------------- // Create THistSvc and TrigMessageSvc //-------------------------------------------------- @@ -65,7 +70,7 @@ int main() { auto t1 = std::chrono::high_resolution_clock::now(); auto td = std::chrono::duration_cast<std::chrono::milliseconds>(t1 - t0); msgsvc.reportMessage("Benchmark", 3, std::string("Time: ").append(std::to_string(td.count()).append(" ms"))); - assert(td.count() < 6000); + assert(td.count() < 8000); //-------------------------------------------------- // Stop and finalise the services -- GitLab