From 37090d6d8f6657ba30bd68af7563bb2967542717 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Tue, 14 Jul 2020 22:50:56 +0200
Subject: [PATCH] TrigServices: Make test timeout shorter in opt build.

Make test timeout shorter in opt build.
---
 .../TrigControl/TrigServices/test/test_TrigMessageSvc.cxx  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/HLT/Trigger/TrigControl/TrigServices/test/test_TrigMessageSvc.cxx b/HLT/Trigger/TrigControl/TrigServices/test/test_TrigMessageSvc.cxx
index 4ebc8c565ae..5de50e99a43 100644
--- a/HLT/Trigger/TrigControl/TrigServices/test/test_TrigMessageSvc.cxx
+++ b/HLT/Trigger/TrigControl/TrigServices/test/test_TrigMessageSvc.cxx
@@ -12,7 +12,12 @@
 #include <chrono>
 #include <cassert>
 
+#ifdef NDEBUG
+static const int timeout = 3000;
+#else
+static const int timeout = 8000;
 #undef NDEBUG
+#endif
 
 constexpr size_t numSources = 1000;
 constexpr size_t numMessages = 50000;
@@ -70,7 +75,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() < 8000);
+  assert(td.count() < timeout);
 
   //--------------------------------------------------
   // Stop and finalise the services
-- 
GitLab