diff options
| author | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-03-17 11:48:34 +0000 |
|---|---|---|
| committer | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-03-17 11:48:34 +0000 |
| commit | d2ecb7f49c3f3b60e3d1f297fd033071a02cfa9a (patch) | |
| tree | 90c34529461f86f2b6f59ba44f9d910214ed8630 /test/test-ingest.cpp | |
| parent | 0e3c2e8dd462a7d56f8b61e15c8cf10681898a1f (diff) | |
| download | webstat-d2ecb7f49c3f3b60e3d1f297fd033071a02cfa9a.tar.bz2 webstat-d2ecb7f49c3f3b60e3d1f297fd033071a02cfa9a.tar.xz webstat-d2ecb7f49c3f3b60e3d1f297fd033071a02cfa9a.zip | |
Execute jobs even when processing incoming logs
Jobs run on background threads now, so we can happily run them even when
we're busy.
Diffstat (limited to 'test/test-ingest.cpp')
| -rw-r--r-- | test/test-ingest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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)); |
