[Tile-serving] [openstreetmap/osm2pgsql] Move declaration of static `db` into tests (#1012)

Sarah Hoffmann notifications at github.com
Tue Dec 3 21:33:24 UTC 2019


The tempdb_t object is intentionally static so that the database is only created once per test run. Also note that the constructor for tempdb_t catches exceptions and exits with an appropriate error message. I admit though that there is still room for improvement in that constructor, e.g. adding noexcept and having an extra catch block for the extension creation that drops the database again.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1012#issuecomment-561366751
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20191203/537ca88f/attachment-0001.html>


More information about the Tile-serving mailing list