Skip to content

Commit

Permalink
More test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mwilsnd committed May 17, 2024
1 parent 4a51dbd commit cb79e38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions test/include/mbgl/test/vector_tile_test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class VectorTileTest {

Tileset tileset{{"https://example.com"}, {0, 22}, "none"};

const std::shared_ptr<Scheduler> threadPool = Scheduler::GetBackground();
TaggedScheduler threadPool;

TileParameters tileParameters{1.0,
MapDebugOptions(),
Expand All @@ -39,10 +39,12 @@ class VectorTileTest {
glyphManager,
0};

VectorTileTest() : threadPool(Scheduler::GetBackground(), this) {}

~VectorTileTest() {
// Ensure that deferred releases are complete before cleaning up
loop.waitForEmpty();
threadPool->waitForEmpty();
threadPool.waitForEmpty();
}
};

Expand Down
3 changes: 2 additions & 1 deletion test/tile/tile_cache.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ class VectorTileMock : public VectorTile {

TEST(TileCache, Smoke) {
VectorTileTest test;
TileCache cache(Scheduler::GetBackground(), 1);
TaggedScheduler scheduler(Scheduler::GetBackground(), &test);
TileCache cache(scheduler, 1);
const OverscaledTileID id(0, 0, 0);
auto tile = std::make_unique<VectorTileMock>(id, "source", test.tileParameters, test.tileset);

Expand Down

0 comments on commit cb79e38

Please sign in to comment.