From b8d941aac613af88cfecf58d3e151eb6144085e8 Mon Sep 17 00:00:00 2001
From: Enrico Guiraud <enrico.guiraud@cern.ch>
Date: Mon, 25 Jun 2018 10:41:47 +0200
Subject: [PATCH] [DF] Change TSlotStackPutBackTooMany to only test the nominal
 case

---
 tree/dataframe/test/dataframe_nodes.cxx | 27 ++++---------------------
 1 file changed, 4 insertions(+), 23 deletions(-)

diff --git a/tree/dataframe/test/dataframe_nodes.cxx b/tree/dataframe/test/dataframe_nodes.cxx
index 22dca1abc53..388fdae3767 100644
--- a/tree/dataframe/test/dataframe_nodes.cxx
+++ b/tree/dataframe/test/dataframe_nodes.cxx
@@ -37,31 +37,12 @@ TEST(RDataFrameNodes, TSlotStackGetOneTooMuch)
 
 TEST(RDataFrameNodes, TSlotStackPutBackTooMany)
 {
-   std::mutex m;
-   auto theTest = [&m]() {
-      unsigned int n(2);
-      ROOT::Internal::RDF::TSlotStack s(n);
-
-      std::vector<std::thread> ts;
-
-      for (unsigned int i = 0; i < 2; ++i) {
-         ts.emplace_back([&s, &m]() {
-            std::lock_guard<std::mutex> lg(m);
-            s.GetSlot();
-         });
-      }
-      for (unsigned int i = 0; i < 2; ++i) {
-         ts.emplace_back([&s, &m, i]() {
-            std::lock_guard<std::mutex> lg(m);
-            s.ReturnSlot(i);
-         });
-      }
-
-      for (auto &&t : ts)
-         t.join();
+   auto theTest = []() {
+      ROOT::Internal::RDF::TSlotStack s(1);
+      s.ReturnSlot(0);
    };
 
-   ASSERT_DEATH(theTest(), "TSlotStack has a reference count relative to an index which will become negative");
+   EXPECT_DEATH(theTest(), "TSlotStack has a reference count relative to an index which will become negative");
 }
 
 #endif
-- 
GitLab