From: Sarah Hoffmann Date: Sat, 20 Mar 2021 09:39:29 +0000 (+0100) Subject: bdd tests: make indexing less verbose X-Git-Tag: v3.7.0~14 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/118befd7d7453b7abf89afaa614e3edfafc47a1b bdd tests: make indexing less verbose Do not print progress info for indexing when there is an error in the BDD tests. --- diff --git a/test/bdd/steps/steps_db_ops.py b/test/bdd/steps/steps_db_ops.py index 465eed65..72a610eb 100644 --- a/test/bdd/steps/steps_db_ops.py +++ b/test/bdd/steps/steps_db_ops.py @@ -1,3 +1,4 @@ +import logging from itertools import chain import psycopg2.extras @@ -5,7 +6,7 @@ import psycopg2.extras from place_inserter import PlaceColumn from table_compare import NominatimID, DBRow -from nominatim.indexer.indexer import Indexer +from nominatim.indexer import indexer def check_database_integrity(context): """ Check some generic constraints on the tables. @@ -103,8 +104,8 @@ def import_and_index_data_from_place_table(context): GROUP BY country_code, pc""") # Call directly as the refresh function does not include postcodes. - indexer = Indexer(context.nominatim.get_libpq_dsn(), 1) - indexer.index_full(analyse=False) + indexer.LOG.setLevel(logging.ERROR) + indexer.Indexer(context.nominatim.get_libpq_dsn(), 1).index_full(analyse=False) check_database_integrity(context)