10000 Fixed catch test (#4910) · Sandychuang/arangodb@f9c2d7a · GitHub
[go: up one dir, main page]

Skip to content

Commit f9c2d7a

Browse files
authored
Fixed catch test (arangodb#4910)
1 parent 5105e2b commit f9c2d7a

File tree

1 file changed

+4
-28
lines changed

1 file changed

+4
-28
lines changed

tests/Aql/EngineInfoContainerCoordinatorTest.cpp

Lines changed: 4 additions & 28 deletions
8000
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ TEST_CASE("EngineInfoContainerCoordinator", "[aql][cluster][coordinator]") {
8383
// 6. Assert (engine->root() != nullptr)
8484
// 7. For all but the first:
8585
// 1. queryRegistry->insert(_id, query, 600.0);
86-
// 2. queryIds.emplace(idOfRemote/dbname, _id);
8786
// 3. query->engine();
8887

8988
SECTION("it should create an ExecutionEngine for the first snippet") {
@@ -302,18 +301,10 @@ TEST_CASE("EngineInfoContainerCoordinator", "[aql][cluster][coordinator]") {
302301
REQUIRE(engine != nullptr);
303302
REQUIRE(engine == &myEngine);
304303

305-
// The first engine should not be stored
306-
// It is not added to the registry
307-
// The second should be
308-
REQUIRE(!queryIds.empty());
309304
// The second engine needs a generated id
310305
REQUIRE(secondId != 0);
311-
312-
// It is stored in the mapping
313-
std::string secIdString = arangodb::basics::StringUtils::itoa(secondId);
314-
std::string remIdString = arangodb::basics::StringUtils::itoa(remoteId) + "/" + dbname;
315-
REQUIRE(queryIds.find(remIdString) != queryIds.end());
316-
REQUIRE(queryIds[remIdString] == secIdString);
306+
// We do not add anything to the ids
307+
REQUIRE(queryIds.empty());
317308

318309
// Validate that the query is wired up with the engine
319310
fakeit::Verify(Method(mockQuery, setEngine)).Exactly(1);
@@ -533,23 +524,8 @@ TEST_CASE("EngineInfoContainerCoordinator", "[aql][cluster][coordinator]") {
533524
ExecutionEngine* engine = result.engine();
534525
REQUIRE(engine != nullptr);
535526
REQUIRE(engine == &myEngine);
536-
537-
// The first engine should not be stored
538-
// It is not added to the registry
539-
// The other two should be
540-
REQUIRE(queryIds.size() == 2);
541-
542-
// First (A) is stored in the mapping
543-
std::string secIdString = arangodb::basics::StringUtils::itoa(secondId);
544-
std::string remIdString = arangodb::basics::StringUtils::itoa(remoteId) + "/" + dbname;
545-
REQUIRE(queryIds.find(remIdString) != queryIds.end());
546-
REQUIRE(queryIds[remIdString] == secIdString);
547-
548-
// Second (B) is stored in the mapping
549-
std::string thirdIdString = arangodb::basics::StringUtils::itoa(thirdId);
550-
std::string secRemIdString = arangodb::basics::StringUtils::itoa(secondRemoteId) + "/" + dbname;
551-
REQUIRE(queryIds.find(secRemIdString) != queryIds.end());
552-
REQUIRE(queryIds[secRemIdString] == thirdIdString);
527+
// We do not add anything to the ids
528+
REQUIRE(queryIds.empty());
553529

554530
// Validate that the query is wired up with the engine
555531
fakeit::Verify(Method(mockQuery, setEngine)).Exactly(1);

0 commit comments

Comments
 (0)
0