diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/perf-ingest.cpp | 2 | ||||
-rw-r--r-- | test/test-ingest.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
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::MockDBPool>("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<MockDBPool>("webstat")}.ingestLogLine( + DB::MockDatabase::openConnectionTo("webstat").get(), line); } |