From 55bfa91bd7bb293f24a4f7781b69186ddc6b5c98 Mon Sep 17 00:00:00 2001 From: Sasha Krassovsky Date: Tue, 9 Jan 2024 20:03:53 -0800 Subject: [PATCH] Fix test again again --- test_runner/regress/test_migrations.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test_runner/regress/test_migrations.py b/test_runner/regress/test_migrations.py index fc26d6a6db..994d52a5d0 100644 --- a/test_runner/regress/test_migrations.py +++ b/test_runner/regress/test_migrations.py @@ -6,9 +6,13 @@ from fixtures.neon_fixtures import NeonEnv def test_migrations(neon_simple_env: NeonEnv): env = neon_simple_env env.neon_cli.create_branch("test_migrations", "empty") + endpoint = env.endpoints.create("test_migrations") + log_path = endpoint.endpoint_path() / "compute.log" + endpoint.respec(skip_pg_catalog_updates=False) endpoint.start() + time.sleep(1) # Sleep to let migrations run with endpoint.cursor() as cur: @@ -16,6 +20,10 @@ def test_migrations(neon_simple_env: NeonEnv): migration_id = cur.fetchall() assert migration_id[0][0] == 2 + with open(log_path, "r") as log_file: + logs = log_file.read() + assert "INFO start_compute:apply_config:handle_migrations: Ran 2 migrations" in logs + endpoint.stop() endpoint.start() time.sleep(1) # Sleep to let migrations run @@ -24,8 +32,6 @@ def test_migrations(neon_simple_env: NeonEnv): migration_id = cur.fetchall() assert migration_id[0][0] == 2 - log_path = endpoint.endpoint_path() / "compute.log" with open(log_path, "r") as log_file: logs = log_file.read() - assert "INFO start_compute:apply_config:handle_migrations: Ran 2 migrations" in logs assert "INFO start_compute:apply_config:handle_migrations: Ran 0 migrations" in logs