diff --git a/tests/AlarmActorTest.cpp b/tests/AlarmActorTest.cpp index 31c9c46a4c922817acb595a13d40598e704ca40f..9246155955fe1c02df96b1f0f5f17f53968a8a3a 100644 --- a/tests/AlarmActorTest.cpp +++ b/tests/AlarmActorTest.cpp @@ -7,9 +7,11 @@ #include "Actor.hpp" // for Actor #include "BinaryPrivateSemaphore.hpp" // for BPS #include "CountingPrivateSemaphore.hpp" // for CPS -#include "Fiber.hpp" // for Fiber -#include "Runtime.hpp" // for Runtime -#include "emper.hpp" // for spawn +#include "Debug.hpp" +#include "Fiber.hpp" +#include "Runtime.hpp" +#include "emper-config.h" +#include "emper.hpp" class AlarmActor : public Actor<BPS*> { protected: @@ -22,7 +24,7 @@ class AlarmActor : public Actor<BPS*> { auto main(int argc, char* argv[]) -> int { unsigned int sleeper_count = std::thread::hardware_concurrency(); - unsigned int sleeps = 1000; + unsigned int sleeps = EMPER_LOG_LEVEL > Info ? 500 : 2500; if (argc > 3) { std::cerr << "Usage: " << argv[0] << " [fiber count] [block count]" << std::endl; diff --git a/tests/SimpleActorTest.cpp b/tests/SimpleActorTest.cpp index c5b284ad67f4858146e1e317b393cef0f3961f99..7e287c2ee37a1922ecca9a853334320687cc0105 100644 --- a/tests/SimpleActorTest.cpp +++ b/tests/SimpleActorTest.cpp @@ -35,7 +35,7 @@ class SumActor : public Actor<uint64_t> { static void mainFiber(void* runtime_ptr) { Runtime& runtime = *(Runtime*)runtime_ptr; - const unsigned int FIBER_COUNT = 1000; + const unsigned int FIBER_COUNT = EMPER_LOG_LEVEL > Info ? 500 : 2500; const uint64_t FIBERS_COUNT_TO = 1000; const uint64_t PER_FIBER_SUM = (FIBERS_COUNT_TO * (FIBERS_COUNT_TO + 1)) / 2; const uint64_t EXPECTED_SUM = FIBER_COUNT * PER_FIBER_SUM; diff --git a/tests/io/LinkFutureTest.cpp b/tests/io/LinkFutureTest.cpp index a5f4fb6588599755c8a86069ab8e874c0ce9168a..2945fabe13e968b0dc5b68a60c32d8d1384abfea 100644 --- a/tests/io/LinkFutureTest.cpp +++ b/tests/io/LinkFutureTest.cpp @@ -10,6 +10,7 @@ #include "Common.hpp" // for DIE_MSG_ERRNO, DIE_MSG #include "Debug.hpp" +#include "emper-config.h" #include "fixtures/assert.hpp" #include "io.hpp" #include "io/Future.hpp" // for ReadFuture, CloseFuture, WriteFuture @@ -50,7 +51,7 @@ static void successLoop() { DIE_MSG_ERRNO("eventfd failed"); } - const unsigned ITERATIONS = 10000; + const unsigned ITERATIONS = EMPER_LOG_LEVEL > Info ? 5000 : 25000; for (unsigned i = 0; i < ITERATIONS; ++i) { uint64_t write_buf = 42; WriteFuture writeFuture(efd, &write_buf, sizeof(write_buf), 0);