From a795f8e1ece4209e587e237f5b084ec92df21a90 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 27 Aug 2025 20:49:18 +0100 Subject: Use a DB connection pool rather than a single connection --- test/perf-ingest.cpp | 2 +- test/test-ingest.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/perf-ingest.cpp b/test/perf-ingest.cpp index 6de3dae..36a3b49 100644 --- a/test/perf-ingest.cpp +++ b/test/perf-ingest.cpp @@ -102,7 +102,7 @@ namespace { void doIngestFile(benchmark::State & state) { - WebStat::Ingestor ingestor {"perf-hostname", DB::MockDatabase::openConnectionTo("webstat")}; + WebStat::Ingestor ingestor {"perf-hostname", std::make_shared("webstat")}; for (auto loop : state) { WebStat::FilePtr logFile {fopen(TMP_LOG.c_str(), "r")}; ingestor.ingestLog(logFile.get()); diff --git a/test/test-ingest.cpp b/test/test-ingest.cpp index 4845bf6..fb35915 100644 --- a/test/test-ingest.cpp +++ b/test/test-ingest.cpp @@ -178,5 +178,6 @@ BOOST_DATA_TEST_CASE(StoreLogLine, }), line) { - WebStat::Ingestor {"test-hostname", DB::MockDatabase::openConnectionTo("webstat")}.ingestLogLine(line); + WebStat::Ingestor {"test-hostname", std::make_shared("webstat")}.ingestLogLine( + DB::MockDatabase::openConnectionTo("webstat").get(), line); } -- cgit v1.2.3