From 0003545f239c79aa15de5788f9951c711cc71782 Mon Sep 17 00:00:00 2001 From: mwilsnd Date: Fri, 17 May 2024 16:19:30 -0400 Subject: [PATCH] More test fixes --- test/style/source.test.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/style/source.test.cpp b/test/style/source.test.cpp index 55655d0fda3..48351dba090 100644 --- a/test/style/source.test.cpp +++ b/test/style/source.test.cpp @@ -64,7 +64,7 @@ class SourceTest { AnnotationManager annotationManager{style}; std::shared_ptr imageManager = std::make_shared(); std::shared_ptr glyphManager = std::make_shared(); - std::shared_ptr threadPool = Scheduler::GetBackground(); + TaggedScheduler threadPool; TileParameters tileParameters(MapMode mapMode = MapMode::Continuous) { return {1.0, @@ -78,7 +78,7 @@ class SourceTest { 0}; }; - SourceTest() { + SourceTest() : threadPool(Scheduler::GetBackground(), this) { // Squelch logging. Log::setObserver(std::make_unique()); @@ -88,7 +88,7 @@ class SourceTest { transformState = transform.getState(); } - ~SourceTest() { threadPool->waitForEmpty(); } + ~SourceTest() { threadPool.waitForEmpty(); } void run() { loop.run(); } @@ -781,8 +781,8 @@ class FakeTileSource : public RenderTileSetSource { MOCK_METHOD1(tileSetNecessity, void(TileNecessity)); MOCK_METHOD1(tileSetMinimumUpdateInterval, void(Duration)); - explicit FakeTileSource(Immutable impl_, std::shared_ptr threadPool_) - : RenderTileSetSource(std::move(impl_), std::move(threadPool_)) {} + explicit FakeTileSource(Immutable impl_, const TaggedScheduler& threadPool_) + : RenderTileSetSource(std::move(impl_), threadPool_) {} void updateInternal(const Tileset& tileset, const std::vector>& layers, const bool needsRendering, @@ -885,8 +885,8 @@ TEST(Source, RenderTileSetSourceUpdate) { class FakeRenderTileSetSource : public RenderTileSetSource { public: - explicit FakeRenderTileSetSource(Immutable impl_, std::shared_ptr threadPool_) - : RenderTileSetSource(std::move(impl_), std::move(threadPool_)) {} + explicit FakeRenderTileSetSource(Immutable impl_, TaggedScheduler threadPool_) + : RenderTileSetSource(std::move(impl_), threadPool_) {} MOCK_METHOD0(mockedUpdateInternal, void());