From 82bdd525a38c4beeb8ab35f3c4ca2a24a6107a38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Sat, 16 Sep 2017 00:44:33 +0200 Subject: [core] make sure tiles are not treated as complete until all worker operations completed Previously, when we started a worker operation that eventually throws an exception (e.g. due to the tile not being parseable), and then enqueue another worker operation while the first one is processing, we treated the worker as idle once the first operation's error callback fired, even though the second operation was still in progress. Due to our use of coalescing, I was unable to come up with a reliable test since we'd need to reproduce the behavior described above, which is timing dependent. --- test/tile/annotation_tile.test.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'test/tile/annotation_tile.test.cpp') diff --git a/test/tile/annotation_tile.test.cpp b/test/tile/annotation_tile.test.cpp index 4d71c5b0b4..ac3e064c50 100644 --- a/test/tile/annotation_tile.test.cpp +++ b/test/tile/annotation_tile.test.cpp @@ -52,8 +52,7 @@ TEST(AnnotationTile, Issue8289) { {}, std::make_unique(), std::move(data), - 0 - }); + }, 0); auto collisionTile = std::make_unique(PlacementConfig()); @@ -65,16 +64,14 @@ TEST(AnnotationTile, Issue8289) { tile.onPlacement(GeometryTile::PlacementResult { {}, std::move(collisionTile), - 0 - }); + }, 0); // Simulate a second layout with empty data. tile.onLayout(GeometryTile::LayoutResult { {}, std::make_unique(), std::make_unique(), - 0 - }); + }, 0); std::unordered_map> result; GeometryCoordinates queryGeometry {{ Point(0, 0) }}; -- cgit v1.2.1