From d849bc502eec4ec95d15ca41319ba0467ab22759 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Thu, 24 Mar 2022 15:55:29 +0100 Subject: [PATCH] =?UTF-8?q?NENTRIES=20is=20not=20always=20a=20multiple=20o?= =?UTF-8?q?f=20the=20expected=20size.=20NENTRIES=20is=2010.=20On=20a=204?= =?UTF-8?q?=20core=20machine=20the=20expected=20size=20in=202=20=C3=97=204?= =?UTF-8?q?=20=3D=208.=20Looping=20over=20the=208=20IDs,=202=20have=202=20?= =?UTF-8?q?entries=20the=20remaining=206=20have=201=20entry=20for=20a=20to?= =?UTF-8?q?tal=20of=2010=20(NENTRIES)=20entries.=20The=20test=20checked=20?= =?UTF-8?q?that=20each=20ID=20had=20NENTRIES/(expected=20size)=20entries,?= =?UTF-8?q?=20which=20in=20this=20case=20with=20integer=20division=20equal?= =?UTF-8?q?s=201=20entry,=20which=20was=20not=20the=20correct=20test.=20Th?= =?UTF-8?q?is=20commit=20chenges=20to=20test=20to=20check=20that=20the=20t?= =?UTF-8?q?otal=20number=20of=20entries=20summed=20for=20all=20IDs=20equal?= =?UTF-8?q?s=20NENTRIES.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tree/dataframe/test/dataframe_samplecallback.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tree/dataframe/test/dataframe_samplecallback.cxx b/tree/dataframe/test/dataframe_samplecallback.cxx index 188d58dd31..d387ea5f86 100644 --- a/tree/dataframe/test/dataframe_samplecallback.cxx +++ b/tree/dataframe/test/dataframe_samplecallback.cxx @@ -125,11 +125,13 @@ TEST_P(RDFSampleCallback, EmptySourceSampleID) { // RDF with empty sources tries to produce 2 tasks per slot when MT is enabled const auto expectedSize = std::min(NENTRIES, df.GetNSlots() * 2ull); ASSERT_EQ(result->size(), expectedSize); + ULong64_t entries = 0; for (auto &id : *result) { // check that all entries start with the expected string EXPECT_TRUE(id.AsString().rfind("Empty source, range: {", 0) == 0); - EXPECT_EQ(id.NEntries(), NENTRIES / expectedSize); + entries += id.NEntries(); } + EXPECT_EQ(entries, NENTRIES); } else { ASSERT_EQ(result->size(), 1); const auto &id = result->at(0); -- 2.35.1