From d2ecb7f49c3f3b60e3d1f297fd033071a02cfa9a Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 17 Mar 2026 11:48:34 +0000 Subject: Execute jobs even when processing incoming logs Jobs run on background threads now, so we can happily run them even when we're busy. --- test/test-ingest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/test-ingest.cpp') diff --git a/test/test-ingest.cpp b/test/test-ingest.cpp index 3effae4..558444d 100644 --- a/test/test-ingest.cpp +++ b/test/test-ingest.cpp @@ -284,7 +284,7 @@ BOOST_AUTO_TEST_CASE(IngestParked, *boost::unit_test::depends_on("I/ParkLogLine" BOOST_AUTO_TEST_CASE(DefaultLaunchNoJobs) { - runJobsIdle(); + runJobsAsNeeded(); BOOST_REQUIRE(!ingestParkedLines.currentRun); BOOST_REQUIRE(!purgeOldLogs.currentRun); } @@ -296,7 +296,7 @@ BOOST_AUTO_TEST_CASE(IngestParkedJob, ingestParkedLines.lastRun = now - 1s; parkLogLine(LOGLINE1); - runJobsIdle(); + runJobsAsNeeded(); BOOST_REQUIRE(!ingestParkedLines.currentRun); BOOST_REQUIRE_EQUAL(linesParked, 1); BOOST_REQUIRE_EQUAL(linesParsed, 0); @@ -309,7 +309,7 @@ BOOST_AUTO_TEST_CASE(IngestParkedJob, BOOST_CHECK_EQUAL(ingestParkedLines.lastRun, now - settings.freqIngestParkedLines + 2s); ingestParkedLines.lastRun = now - settings.freqIngestParkedLines - 1s; - runJobsIdle(); + runJobsAsNeeded(); BOOST_REQUIRE(ingestParkedLines.currentRun); ingestParkedLines.currentRun->join(); BOOST_CHECK_EQUAL(linesParsed, 1); @@ -324,7 +324,7 @@ BOOST_AUTO_TEST_CASE(JobErrorRescheduler, *boost::unit_test::depends_on("I/Inges ingestParkedLines.lastRun = now - settings.freqIngestParkedLines - 1s; parkLogLine(LOGLINE1); std::filesystem::permissions(settings.fallbackDir / LOGLINE1_PARKED, std::filesystem::perms::owner_write); - runJobsIdle(); + runJobsAsNeeded(); BOOST_REQUIRE(ingestParkedLines.currentRun); ingestParkedLines.currentRun->join(); BOOST_CHECK(std::filesystem::exists(settings.fallbackDir / LOGLINE1_PARKED)); -- cgit v1.3