summaryrefslogtreecommitdiff
path: root/test/test-ingest.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan.goodliffe@octal.co.uk>2026-05-01 15:31:02 +0100
committerDan Goodliffe <dan.goodliffe@octal.co.uk>2026-05-01 15:31:02 +0100
commited3598ac6f77f62b0c4fe32d4dab05784e5fa51d (patch)
tree6d535ab4228d8804cee2b3e11b69634988e33447 /test/test-ingest.cpp
parent917487a6de80bf5e81eebcdbbf48bcf9763262fa (diff)
downloadwebstat-ed3598ac6f77f62b0c4fe32d4dab05784e5fa51d.tar.bz2
webstat-ed3598ac6f77f62b0c4fe32d4dab05784e5fa51d.tar.xz
webstat-ed3598ac6f77f62b0c4fe32d4dab05784e5fa51d.zip
Return a callable from jobs
Allows safely running finalisation code in the main thread if required.
Diffstat (limited to 'test/test-ingest.cpp')
-rw-r--r--test/test-ingest.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/test-ingest.cpp b/test/test-ingest.cpp
index 88e80e8..4f9c7ab 100644
--- a/test/test-ingest.cpp
+++ b/test/test-ingest.cpp
@@ -320,7 +320,9 @@ BOOST_AUTO_TEST_CASE(IngestParked, *boost::unit_test::depends_on("I/ParkLogLine"
BOOST_REQUIRE(parkQueuedLogLines());
BOOST_CHECK(!std::filesystem::is_empty(settings.fallbackDir));
BOOST_REQUIRE(queuedLines.empty());
- jobIngestParkedLines();
+ const auto result = jobIngestParkedLines();
+ BOOST_REQUIRE(result);
+ BOOST_CHECK_EQUAL(result(), 1);
BOOST_CHECK_EQUAL(queuedLines.size(), 2);
BOOST_CHECK(std::filesystem::is_empty(settings.fallbackDir));
}
@@ -418,7 +420,7 @@ BOOST_AUTO_TEST_CASE(DiscardUnparsable)
BOOST_AUTO_TEST_CASE(PurgeOldJob)
{
- BOOST_CHECK_EQUAL(2, jobPurgeOldLogs());
+ BOOST_CHECK_EQUAL(2, jobPurgeOldLogs()());
}
BOOST_AUTO_TEST_CASE(LogStatsSignal)