Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 3 additions & 20 deletions src/iocore/eventsystem/unit_tests/test_EventSystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,18 @@
limitations under the License.
*/

#include "inkevent_test_fixtures.h"

#include <catch2/catch_test_macros.hpp>
#include <catch2/reporters/catch_reporter_event_listener.hpp>
#include <catch2/reporters/catch_reporter_registrars.hpp>
#include <catch2/interfaces/catch_interfaces_config.hpp>

#include "iocore/eventsystem/EventSystem.h"
#include "tscore/ink_atomic.h"
#include "tscore/Layout.h"
#include "tscore/TSSystemState.h"

#include "iocore/utils/diags.i"
using inkevent_test::EventProcessorListener;

#define TEST_TIME_SECOND 60
#define TEST_THREADS 2
Expand Down Expand Up @@ -83,24 +84,6 @@ TEST_CASE("EventSystem", "[iocore]")
}
}

struct EventProcessorListener : Catch::EventListenerBase {
using EventListenerBase::EventListenerBase;

void
testRunStarting(Catch::TestRunInfo const & /* testRunInfo ATS_UNUSED */) override
{
Layout::create();
init_diags("", nullptr);
RecProcessInit();

ink_event_system_init(EVENT_SYSTEM_MODULE_PUBLIC_VERSION);
eventProcessor.start(TEST_THREADS, 1048576); // Hardcoded stacksize at 1MB

EThread *main_thread = new EThread;
main_thread->set_specific();
}
};

CATCH_REGISTER_LISTENER(EventProcessorListener);

TEST_CASE("EventSystemUnixSocket", "[iocore][sock]")
Expand Down