mirror of
https://github.com/neondatabase/neon.git
synced 2025-12-24 22:59:59 +00:00
## Problem `TYPE_CHECKING` is used inconsistently across Python tests. ## Summary of changes - Update `ruff`: 0.7.0 -> 0.11.2 - Enable TC (flake8-type-checking): https://docs.astral.sh/ruff/rules/#flake8-type-checking-tc - (auto)fix all new issues
23 lines
606 B
Python
23 lines
606 B
Python
"""Tests for the code in test fixtures"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
if TYPE_CHECKING:
|
|
from fixtures.neon_fixtures import NeonEnvBuilder
|
|
|
|
|
|
# Test that pageserver and safekeeper can restart quickly.
|
|
# This is a regression test, see https://github.com/neondatabase/neon/issues/2247
|
|
def test_fixture_restart(neon_env_builder: NeonEnvBuilder):
|
|
env = neon_env_builder.init_start()
|
|
|
|
for _ in range(3):
|
|
env.pageserver.stop()
|
|
env.pageserver.start()
|
|
|
|
for _ in range(3):
|
|
env.safekeepers[0].stop()
|
|
env.safekeepers[0].start()
|