summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2015-05-29 15:30:50 +0300
committerThiago Marcos P. Santos <thiago@mapbox.com>2015-06-04 14:44:34 +0300
commitb09df7acb5139e50b3de7bfcb7e92909ba9c3a56 (patch)
tree1571e671b6c9f884a9891a20ba792382db001ae3 /test
parent29b8b44b7767312095e9489a97ba9eea3f1797af (diff)
downloadqtlocation-mapboxgl-b09df7acb5139e50b3de7bfcb7e92909ba9c3a56.tar.gz
Cleanup the MapContext before the util::Thread destructor
The util::Thread will call the stop() method of the MapContext's RunLoop which will wait for the pending tasks tied to it to complete. If we have a request that is timeout'ing, this could mean a really long wait. Instead, we now send a cleanup message that will reset all the attributes first (canceling the pending requests) so the the MapContext gets destructed quickly.
Diffstat (limited to 'test')
-rw-r--r--test/miscellaneous/map_context.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/miscellaneous/map_context.cpp b/test/miscellaneous/map_context.cpp
index ed51923036..15061b1225 100644
--- a/test/miscellaneous/map_context.cpp
+++ b/test/miscellaneous/map_context.cpp
@@ -19,4 +19,5 @@ TEST(MapContext, DoubleStyleLoad) {
context.invokeSync(&MapContext::setStyleJSON, "", "");
context.invokeSync(&MapContext::setStyleJSON, "", "");
+ context.invokeSync(&MapContext::cleanup);
}