From ee50f43109b86a1981af6587dff2e404332851ca Mon Sep 17 00:00:00 2001 From: Nathan Brei Date: Tue, 28 May 2024 10:07:45 -0400 Subject: [PATCH] Remove straggling references to JSubeventMailbox Addresses issue #303 --- .../SubeventCUDAExample.cu | 1 - .../unit_tests/Topology/SubeventTests.cc | 84 +------------------ 2 files changed, 1 insertion(+), 84 deletions(-) diff --git a/src/examples/SubeventCUDAExample/SubeventCUDAExample.cu b/src/examples/SubeventCUDAExample/SubeventCUDAExample.cu index 695a73853..1bc4287d0 100644 --- a/src/examples/SubeventCUDAExample/SubeventCUDAExample.cu +++ b/src/examples/SubeventCUDAExample/SubeventCUDAExample.cu @@ -4,7 +4,6 @@ #include #include -#include #include #include #include diff --git a/src/programs/unit_tests/Topology/SubeventTests.cc b/src/programs/unit_tests/Topology/SubeventTests.cc index 6e7e2d505..b4b5c8b9a 100644 --- a/src/programs/unit_tests/Topology/SubeventTests.cc +++ b/src/programs/unit_tests/Topology/SubeventTests.cc @@ -42,88 +42,6 @@ TEST_CASE("Create subevent processor") { REQUIRE(output->z == 29.6f); } -#if 0 -TEST_CASE("Simplest working SubeventMailbox") { - - std::vector> unmerged; - auto event1 = std::make_shared(); - auto event2 = std::make_shared(); - - unmerged.push_back(SubeventWrapper(&event1, new MyOutput(2), 1, 5)); - unmerged.push_back(SubeventWrapper(&event1, new MyOutput(4), 2, 5)); - unmerged.push_back(SubeventWrapper(&event1, new MyOutput(6), 3, 5)); - - JSubeventMailbox mailbox; - mailbox.push(unmerged); - - unmerged.push_back(SubeventWrapper(&event1, new MyOutput(8), 4, 5)); - unmerged.push_back(SubeventWrapper(&event1, new MyOutput(10), 5, 5)); - mailbox.push(unmerged); - - std::vector*> merged; - JSubeventMailbox::Status result = mailbox.pop(merged, 1); - - REQUIRE(result == JSubeventMailbox::Status::Empty); - REQUIRE(merged.size() == 1); - auto items_in_event = (*(merged[0]))->Get(); - REQUIRE(items_in_event.size() == 5); -} - - -TEST_CASE("SubeventMailbox with two overlapping events") { - - JSubeventMailbox mailbox; - std::vector> unmerged; - std::vector*> merged; - - auto event1 = std::make_shared(); - auto event2 = std::make_shared(); - - unmerged.push_back(SubeventWrapper(&event1, new MyOutput(2), 1, 5)); - unmerged.push_back(SubeventWrapper(&event1, new MyOutput(4), 2, 5)); - unmerged.push_back(SubeventWrapper(&event1, new MyOutput(6), 3, 5)); - - mailbox.push(unmerged); - - // We don't have a complete event merged yet - JSubeventMailbox::Status result = mailbox.pop(merged, 1); - REQUIRE(result == JSubeventMailbox::Status::Empty); - - - // Now we mix in some subevents from event 2 - unmerged.push_back(SubeventWrapper(&event2, new MyOutput(1), 1, 4)); - unmerged.push_back(SubeventWrapper(&event2, new MyOutput(3), 2, 4)); - unmerged.push_back(SubeventWrapper(&event2, new MyOutput(5), 3, 4)); - - // Still not able to pop anything because neither of the events are complete - JSubeventMailbox::Status result1 = mailbox.pop(merged, 1); - REQUIRE(result1 == JSubeventMailbox::Status::Empty); - - // Now we receive the rest of the subevents from event 1 - unmerged.push_back(SubeventWrapper(&event1, new MyOutput(8), 4, 5)); - unmerged.push_back(SubeventWrapper(&event1, new MyOutput(10), 5, 5)); - mailbox.push(unmerged); - - // We were able to get event1 out, but not event 2 - JSubeventMailbox::Status result2 = mailbox.pop(merged, 2); - REQUIRE(result2 == JSubeventMailbox::Status::Empty); - REQUIRE(merged.size() == 1); - REQUIRE(merged[0] == &event1); - merged.clear(); - - // Now we add the remaining subevents from event 2 - unmerged.push_back(SubeventWrapper(&event2, new MyOutput(7), 4, 4)); - mailbox.push(unmerged); - - // Now we can pop event2 - JSubeventMailbox::Status result3 = mailbox.pop(merged, 2); - REQUIRE(result3 == JSubeventMailbox::Status::Empty); - REQUIRE(merged.size() == 1); - REQUIRE(merged[0] == &event2); - auto items_in_event = (*(merged[0]))->Get(); - REQUIRE(items_in_event.size() == 4); -} -#endif TEST_CASE("Basic subevent arrow functionality") { @@ -174,7 +92,7 @@ TEST_CASE("Basic subevent arrow functionality") { } }; - SECTION("Execute subevent arrows end-to-end using same example as in JSubeventMailbox") { + SECTION("Execute subevent arrows end-to-end") { JApplication app; app.SetParameterValue("log:info", "JWorker,JScheduler,JArrow,JArrowProcessingController,JEventProcessorArrow");