mirror of
https://github.com/neondatabase/neon.git
synced 2025-12-23 06:09:59 +00:00
python: allow using allowed_errors.py (#7719)
See #7718. Fix it by renaming all `types.py` to `common_types.py`. Additionally, add an advert for using `allowed_errors.py` to test any added regex.
This commit is contained in:
18
scripts/check_allowed_errors.sh
Executable file
18
scripts/check_allowed_errors.sh
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
HELPER_DIR="$(dirname "${BASH_SOURCE[0]}")"
|
||||||
|
SCRIPT="test_runner/fixtures/pageserver/allowed_errors.py"
|
||||||
|
|
||||||
|
# first run to understand all of the errors:
|
||||||
|
#
|
||||||
|
# example: ./scripts/check_allowed_errors.sh -i - < pageserver.log
|
||||||
|
# example: ./scripts/check_allowed_errors.sh -i pageserver.log
|
||||||
|
#
|
||||||
|
# then edit the test local allowed_errors to the
|
||||||
|
# test_runner/fixtures/pageserver/allowed_errors.py, then re-run to make sure
|
||||||
|
# they are handled.
|
||||||
|
#
|
||||||
|
# finally revert any local changes to allowed_errors.py.
|
||||||
|
poetry run python3 "$HELPER_DIR/../$SCRIPT" $*
|
||||||
@@ -19,9 +19,9 @@ from _pytest.config.argparsing import Parser
|
|||||||
from _pytest.fixtures import FixtureRequest
|
from _pytest.fixtures import FixtureRequest
|
||||||
from _pytest.terminal import TerminalReporter
|
from _pytest.terminal import TerminalReporter
|
||||||
|
|
||||||
|
from fixtures.common_types import TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import NeonPageserver
|
from fixtures.neon_fixtures import NeonPageserver
|
||||||
from fixtures.types import TenantId, TimelineId
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
This file contains fixtures for micro-benchmarks.
|
This file contains fixtures for micro-benchmarks.
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import pytest
|
|||||||
from werkzeug.wrappers.request import Request
|
from werkzeug.wrappers.request import Request
|
||||||
from werkzeug.wrappers.response import Response
|
from werkzeug.wrappers.response import Response
|
||||||
|
|
||||||
|
from fixtures.common_types import TenantId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.types import TenantId
|
|
||||||
|
|
||||||
|
|
||||||
class ComputeReconfigure:
|
class ComputeReconfigure:
|
||||||
|
|||||||
@@ -47,14 +47,15 @@ from urllib3.util.retry import Retry
|
|||||||
|
|
||||||
from fixtures import overlayfs
|
from fixtures import overlayfs
|
||||||
from fixtures.broker import NeonBroker
|
from fixtures.broker import NeonBroker
|
||||||
|
from fixtures.common_types import Lsn, TenantId, TenantShardId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.metrics import Metrics, MetricsGetter, parse_metrics
|
from fixtures.metrics import Metrics, MetricsGetter, parse_metrics
|
||||||
from fixtures.pageserver.allowed_errors import (
|
from fixtures.pageserver.allowed_errors import (
|
||||||
DEFAULT_PAGESERVER_ALLOWED_ERRORS,
|
DEFAULT_PAGESERVER_ALLOWED_ERRORS,
|
||||||
DEFAULT_STORAGE_CONTROLLER_ALLOWED_ERRORS,
|
DEFAULT_STORAGE_CONTROLLER_ALLOWED_ERRORS,
|
||||||
)
|
)
|
||||||
|
from fixtures.pageserver.common_types import IndexPartDump, LayerName, parse_layer_file_name
|
||||||
from fixtures.pageserver.http import PageserverHttpClient
|
from fixtures.pageserver.http import PageserverHttpClient
|
||||||
from fixtures.pageserver.types import IndexPartDump, LayerName, parse_layer_file_name
|
|
||||||
from fixtures.pageserver.utils import (
|
from fixtures.pageserver.utils import (
|
||||||
wait_for_last_record_lsn,
|
wait_for_last_record_lsn,
|
||||||
wait_for_upload,
|
wait_for_upload,
|
||||||
@@ -72,7 +73,6 @@ from fixtures.remote_storage import (
|
|||||||
)
|
)
|
||||||
from fixtures.safekeeper.http import SafekeeperHttpClient
|
from fixtures.safekeeper.http import SafekeeperHttpClient
|
||||||
from fixtures.safekeeper.utils import are_walreceivers_absent
|
from fixtures.safekeeper.utils import are_walreceivers_absent
|
||||||
from fixtures.types import Lsn, TenantId, TenantShardId, TimelineId
|
|
||||||
from fixtures.utils import (
|
from fixtures.utils import (
|
||||||
ATTACHMENT_NAME_REGEX,
|
ATTACHMENT_NAME_REGEX,
|
||||||
allure_add_grafana_links,
|
allure_add_grafana_links,
|
||||||
|
|||||||
@@ -131,9 +131,10 @@ if __name__ == "__main__":
|
|||||||
"-i",
|
"-i",
|
||||||
"--input",
|
"--input",
|
||||||
type=argparse.FileType("r"),
|
type=argparse.FileType("r"),
|
||||||
default=sys.stdin,
|
help="Pageserver logs file. Use '-' for stdin.",
|
||||||
help="Pageserver logs file. Reads from stdin if no file is provided.",
|
required=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
errors = _check_allowed_errors(args.input)
|
errors = _check_allowed_errors(args.input)
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import re
|
|||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import Any, Dict, Tuple, Union
|
from typing import Any, Dict, Tuple, Union
|
||||||
|
|
||||||
from fixtures.types import KEY_MAX, KEY_MIN, Key, Lsn
|
from fixtures.common_types import KEY_MAX, KEY_MIN, Key, Lsn
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@@ -11,10 +11,10 @@ import requests
|
|||||||
from requests.adapters import HTTPAdapter
|
from requests.adapters import HTTPAdapter
|
||||||
from urllib3.util.retry import Retry
|
from urllib3.util.retry import Retry
|
||||||
|
|
||||||
|
from fixtures.common_types import Lsn, TenantId, TenantShardId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.metrics import Metrics, MetricsGetter, parse_metrics
|
from fixtures.metrics import Metrics, MetricsGetter, parse_metrics
|
||||||
from fixtures.pg_version import PgVersion
|
from fixtures.pg_version import PgVersion
|
||||||
from fixtures.types import Lsn, TenantId, TenantShardId, TimelineId
|
|
||||||
from fixtures.utils import Fn
|
from fixtures.utils import Fn
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import time
|
|||||||
from typing import Any, Callable, Dict, Tuple
|
from typing import Any, Callable, Dict, Tuple
|
||||||
|
|
||||||
import fixtures.pageserver.remote_storage
|
import fixtures.pageserver.remote_storage
|
||||||
|
from fixtures.common_types import TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
NeonEnv,
|
NeonEnv,
|
||||||
@@ -12,7 +13,6 @@ from fixtures.pageserver.utils import (
|
|||||||
wait_until_tenant_state,
|
wait_until_tenant_state,
|
||||||
)
|
)
|
||||||
from fixtures.remote_storage import LocalFsStorage, RemoteStorageKind
|
from fixtures.remote_storage import LocalFsStorage, RemoteStorageKind
|
||||||
from fixtures.types import TenantId, TimelineId
|
|
||||||
|
|
||||||
|
|
||||||
def single_timeline(
|
def single_timeline(
|
||||||
|
|||||||
@@ -6,13 +6,13 @@ import threading
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any, List, Tuple
|
from typing import Any, List, Tuple
|
||||||
|
|
||||||
|
from fixtures.common_types import TenantId, TimelineId
|
||||||
from fixtures.neon_fixtures import NeonEnv, Pagectl
|
from fixtures.neon_fixtures import NeonEnv, Pagectl
|
||||||
from fixtures.pageserver.types import (
|
from fixtures.pageserver.common_types import (
|
||||||
InvalidFileName,
|
InvalidFileName,
|
||||||
parse_layer_file_name,
|
parse_layer_file_name,
|
||||||
)
|
)
|
||||||
from fixtures.remote_storage import LocalFsStorage
|
from fixtures.remote_storage import LocalFsStorage
|
||||||
from fixtures.types import TenantId, TimelineId
|
|
||||||
|
|
||||||
|
|
||||||
def duplicate_one_tenant(env: NeonEnv, template_tenant: TenantId, new_tenant: TenantId):
|
def duplicate_one_tenant(env: NeonEnv, template_tenant: TenantId, new_tenant: TenantId):
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ from mypy_boto3_s3.type_defs import (
|
|||||||
ObjectTypeDef,
|
ObjectTypeDef,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
from fixtures.common_types import Lsn, TenantId, TenantShardId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.pageserver.http import PageserverApiException, PageserverHttpClient
|
from fixtures.pageserver.http import PageserverApiException, PageserverHttpClient
|
||||||
from fixtures.remote_storage import RemoteStorage, RemoteStorageKind, S3Storage
|
from fixtures.remote_storage import RemoteStorage, RemoteStorageKind, S3Storage
|
||||||
from fixtures.types import Lsn, TenantId, TenantShardId, TimelineId
|
|
||||||
from fixtures.utils import wait_until
|
from fixtures.utils import wait_until
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ import boto3
|
|||||||
import toml
|
import toml
|
||||||
from mypy_boto3_s3 import S3Client
|
from mypy_boto3_s3 import S3Client
|
||||||
|
|
||||||
|
from fixtures.common_types import TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.types import TenantId, TimelineId
|
|
||||||
|
|
||||||
TIMELINE_INDEX_PART_FILE_NAME = "index_part.json"
|
TIMELINE_INDEX_PART_FILE_NAME = "index_part.json"
|
||||||
TENANT_HEATMAP_FILE_NAME = "heatmap-v1.json"
|
TENANT_HEATMAP_FILE_NAME = "heatmap-v1.json"
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union
|
|||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
from fixtures.common_types import Lsn, TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.types import Lsn, TenantId, TimelineId
|
|
||||||
|
|
||||||
|
|
||||||
# Walreceiver as returned by sk's timeline status endpoint.
|
# Walreceiver as returned by sk's timeline status endpoint.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
from fixtures.common_types import TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.safekeeper.http import SafekeeperHttpClient
|
from fixtures.safekeeper.http import SafekeeperHttpClient
|
||||||
from fixtures.types import TenantId, TimelineId
|
|
||||||
|
|
||||||
|
|
||||||
def are_walreceivers_absent(
|
def are_walreceivers_absent(
|
||||||
|
|||||||
@@ -25,14 +25,14 @@ import zstandard
|
|||||||
from psycopg2.extensions import cursor
|
from psycopg2.extensions import cursor
|
||||||
|
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.pageserver.types import (
|
from fixtures.pageserver.common_types import (
|
||||||
parse_delta_layer,
|
parse_delta_layer,
|
||||||
parse_image_layer,
|
parse_image_layer,
|
||||||
)
|
)
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from fixtures.neon_fixtures import PgBin
|
from fixtures.neon_fixtures import PgBin
|
||||||
from fixtures.types import TimelineId
|
from fixtures.common_types import TimelineId
|
||||||
|
|
||||||
Fn = TypeVar("Fn", bound=Callable[..., Any])
|
Fn = TypeVar("Fn", bound=Callable[..., Any])
|
||||||
|
|
||||||
@@ -452,6 +452,7 @@ def humantime_to_ms(humantime: str) -> float:
|
|||||||
|
|
||||||
|
|
||||||
def scan_log_for_errors(input: Iterable[str], allowed_errors: List[str]) -> List[Tuple[int, str]]:
|
def scan_log_for_errors(input: Iterable[str], allowed_errors: List[str]) -> List[Tuple[int, str]]:
|
||||||
|
# FIXME: this duplicates test_runner/fixtures/pageserver/allowed_errors.py
|
||||||
error_or_warn = re.compile(r"\s(ERROR|WARN)")
|
error_or_warn = re.compile(r"\s(ERROR|WARN)")
|
||||||
errors = []
|
errors = []
|
||||||
for lineno, line in enumerate(input, start=1):
|
for lineno, line in enumerate(input, start=1):
|
||||||
@@ -484,7 +485,7 @@ def assert_no_errors(log_file, service, allowed_errors):
|
|||||||
for _lineno, error in errors:
|
for _lineno, error in errors:
|
||||||
log.info(f"not allowed {service} error: {error.strip()}")
|
log.info(f"not allowed {service} error: {error.strip()}")
|
||||||
|
|
||||||
assert not errors, f"Log errors on {service}: {errors[0]}"
|
assert not errors, f"First log error on {service}: {errors[0]}\nHint: use scripts/check_allowed_errors.sh to test any new allowed_error you add"
|
||||||
|
|
||||||
|
|
||||||
@enum.unique
|
@enum.unique
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import threading
|
import threading
|
||||||
from typing import Any, Optional
|
from typing import Any, Optional
|
||||||
|
|
||||||
|
from fixtures.common_types import TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
Endpoint,
|
Endpoint,
|
||||||
@@ -10,7 +11,6 @@ from fixtures.neon_fixtures import (
|
|||||||
wait_for_last_flush_lsn,
|
wait_for_last_flush_lsn,
|
||||||
)
|
)
|
||||||
from fixtures.pageserver.utils import wait_for_last_record_lsn, wait_for_upload
|
from fixtures.pageserver.utils import wait_for_last_record_lsn, wait_for_upload
|
||||||
from fixtures.types import TenantId, TimelineId
|
|
||||||
|
|
||||||
# neon_local doesn't handle creating/modifying endpoints concurrently, so we use a mutex
|
# neon_local doesn't handle creating/modifying endpoints concurrently, so we use a mutex
|
||||||
# to ensure we don't do that: this enables running lots of Workloads in parallel safely.
|
# to ensure we don't do that: this enables running lots of Workloads in parallel safely.
|
||||||
|
|||||||
@@ -5,13 +5,13 @@ Utilities used by all code in this sub-directory
|
|||||||
from typing import Any, Callable, Dict, Tuple
|
from typing import Any, Callable, Dict, Tuple
|
||||||
|
|
||||||
import fixtures.pageserver.many_tenants as many_tenants
|
import fixtures.pageserver.many_tenants as many_tenants
|
||||||
|
from fixtures.common_types import TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
NeonEnv,
|
NeonEnv,
|
||||||
NeonEnvBuilder,
|
NeonEnvBuilder,
|
||||||
)
|
)
|
||||||
from fixtures.pageserver.utils import wait_until_all_tenants_state
|
from fixtures.pageserver.utils import wait_until_all_tenants_state
|
||||||
from fixtures.types import TenantId, TimelineId
|
|
||||||
|
|
||||||
|
|
||||||
def ensure_pageserver_ready_for_benchmarking(env: NeonEnv, n_tenants: int):
|
def ensure_pageserver_ready_for_benchmarking(env: NeonEnv, n_tenants: int):
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ from typing import List
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from fixtures.benchmark_fixture import MetricReport, NeonBenchmarker
|
from fixtures.benchmark_fixture import MetricReport, NeonBenchmarker
|
||||||
|
from fixtures.common_types import Lsn
|
||||||
from fixtures.compare_fixtures import NeonCompare
|
from fixtures.compare_fixtures import NeonCompare
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import NeonPageserver
|
from fixtures.neon_fixtures import NeonPageserver
|
||||||
from fixtures.pageserver.utils import wait_for_last_record_lsn
|
from fixtures.pageserver.utils import wait_for_last_record_lsn
|
||||||
from fixtures.types import Lsn
|
|
||||||
from fixtures.utils import wait_until
|
from fixtures.utils import wait_until
|
||||||
from prometheus_client.samples import Sample
|
from prometheus_client.samples import Sample
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ from contextlib import closing
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from fixtures.benchmark_fixture import MetricReport
|
from fixtures.benchmark_fixture import MetricReport
|
||||||
|
from fixtures.common_types import Lsn
|
||||||
from fixtures.compare_fixtures import NeonCompare, PgCompare
|
from fixtures.compare_fixtures import NeonCompare, PgCompare
|
||||||
from fixtures.pageserver.utils import wait_tenant_status_404
|
from fixtures.pageserver.utils import wait_tenant_status_404
|
||||||
from fixtures.pg_version import PgVersion
|
from fixtures.pg_version import PgVersion
|
||||||
from fixtures.types import Lsn
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import random
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import TenantId, TenantShardId, TimelineId
|
||||||
from fixtures.compute_reconfigure import ComputeReconfigure
|
from fixtures.compute_reconfigure import ComputeReconfigure
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
@@ -10,7 +11,6 @@ from fixtures.neon_fixtures import (
|
|||||||
)
|
)
|
||||||
from fixtures.pageserver.http import PageserverHttpClient
|
from fixtures.pageserver.http import PageserverHttpClient
|
||||||
from fixtures.pg_version import PgVersion
|
from fixtures.pg_version import PgVersion
|
||||||
from fixtures.types import TenantId, TenantShardId, TimelineId
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.timeout(3600) # super long running test: should go down as we optimize
|
@pytest.mark.timeout(3600) # super long running test: should go down as we optimize
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ from typing import Any, Callable, List
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from fixtures.benchmark_fixture import MetricReport, NeonBenchmarker
|
from fixtures.benchmark_fixture import MetricReport, NeonBenchmarker
|
||||||
|
from fixtures.common_types import Lsn
|
||||||
from fixtures.compare_fixtures import NeonCompare, PgCompare, VanillaCompare
|
from fixtures.compare_fixtures import NeonCompare, PgCompare, VanillaCompare
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import DEFAULT_BRANCH_NAME, NeonEnvBuilder, PgBin
|
from fixtures.neon_fixtures import DEFAULT_BRANCH_NAME, NeonEnvBuilder, PgBin
|
||||||
from fixtures.types import Lsn
|
|
||||||
|
|
||||||
from performance.test_perf_pgbench import get_durations_matrix, get_scales_matrix
|
from performance.test_perf_pgbench import get_durations_matrix, get_scales_matrix
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
from fixtures.common_types import TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import NeonEnvBuilder
|
from fixtures.neon_fixtures import NeonEnvBuilder
|
||||||
from fixtures.types import TimelineId
|
|
||||||
from fixtures.utils import query_scalar
|
from fixtures.utils import query_scalar
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ from dataclasses import dataclass
|
|||||||
from typing import Generator, Optional
|
from typing import Generator, Optional
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import TenantId
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
NeonEnv,
|
NeonEnv,
|
||||||
NeonEnvBuilder,
|
NeonEnvBuilder,
|
||||||
)
|
)
|
||||||
from fixtures.pageserver.http import PageserverApiException, TenantConfig
|
from fixtures.pageserver.http import PageserverApiException, TenantConfig
|
||||||
from fixtures.remote_storage import LocalFsStorage, RemoteStorageKind
|
from fixtures.remote_storage import LocalFsStorage, RemoteStorageKind
|
||||||
from fixtures.types import TenantId
|
|
||||||
from fixtures.utils import wait_until
|
from fixtures.utils import wait_until
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ from pathlib import Path
|
|||||||
|
|
||||||
import psycopg2
|
import psycopg2
|
||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import TenantId, TimelineId
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
NeonEnv,
|
NeonEnv,
|
||||||
NeonEnvBuilder,
|
NeonEnvBuilder,
|
||||||
PgProtocol,
|
PgProtocol,
|
||||||
)
|
)
|
||||||
from fixtures.pageserver.http import PageserverApiException, PageserverHttpClient
|
from fixtures.pageserver.http import PageserverApiException, PageserverHttpClient
|
||||||
from fixtures.types import TenantId, TimelineId
|
|
||||||
|
|
||||||
|
|
||||||
def assert_client_authorized(env: NeonEnv, http_client: PageserverHttpClient):
|
def assert_client_authorized(env: NeonEnv, http_client: PageserverHttpClient):
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ import threading
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import Lsn, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import NeonEnv
|
from fixtures.neon_fixtures import NeonEnv
|
||||||
from fixtures.pageserver.http import TimelineCreate406
|
from fixtures.pageserver.http import TimelineCreate406
|
||||||
from fixtures.types import Lsn, TimelineId
|
|
||||||
from fixtures.utils import query_scalar
|
from fixtures.utils import query_scalar
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import Lsn, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import NeonEnvBuilder
|
from fixtures.neon_fixtures import NeonEnvBuilder
|
||||||
from fixtures.pageserver.http import TimelineCreate406
|
from fixtures.pageserver.http import TimelineCreate406
|
||||||
from fixtures.types import Lsn, TimelineId
|
|
||||||
from fixtures.utils import print_gc_result, query_scalar
|
from fixtures.utils import print_gc_result, query_scalar
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ from concurrent.futures import ThreadPoolExecutor
|
|||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import Lsn, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
Endpoint,
|
Endpoint,
|
||||||
@@ -14,7 +15,6 @@ from fixtures.neon_fixtures import (
|
|||||||
)
|
)
|
||||||
from fixtures.pageserver.http import PageserverApiException
|
from fixtures.pageserver.http import PageserverApiException
|
||||||
from fixtures.pageserver.utils import wait_until_tenant_active
|
from fixtures.pageserver.utils import wait_until_tenant_active
|
||||||
from fixtures.types import Lsn, TimelineId
|
|
||||||
from fixtures.utils import query_scalar
|
from fixtures.utils import query_scalar
|
||||||
from performance.test_perf_pgbench import get_scales_matrix
|
from performance.test_perf_pgbench import get_scales_matrix
|
||||||
from requests import RequestException
|
from requests import RequestException
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import os
|
|||||||
from typing import List, Tuple
|
from typing import List, Tuple
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
Endpoint,
|
Endpoint,
|
||||||
@@ -11,7 +12,6 @@ from fixtures.neon_fixtures import (
|
|||||||
wait_for_last_flush_lsn,
|
wait_for_last_flush_lsn,
|
||||||
)
|
)
|
||||||
from fixtures.pg_version import PgVersion
|
from fixtures.pg_version import PgVersion
|
||||||
from fixtures.types import TenantId, TimelineId
|
|
||||||
|
|
||||||
|
|
||||||
# Test restarting page server, while safekeeper and compute node keep
|
# Test restarting page server, while safekeeper and compute node keep
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ from typing import List, Optional
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import toml
|
import toml
|
||||||
|
from fixtures.common_types import Lsn
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
NeonEnv,
|
NeonEnv,
|
||||||
@@ -21,7 +22,6 @@ from fixtures.pageserver.utils import (
|
|||||||
)
|
)
|
||||||
from fixtures.pg_version import PgVersion
|
from fixtures.pg_version import PgVersion
|
||||||
from fixtures.remote_storage import RemoteStorageKind
|
from fixtures.remote_storage import RemoteStorageKind
|
||||||
from fixtures.types import Lsn
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# A test suite that help to prevent unintentionally breaking backward or forward compatibility between Neon releases.
|
# A test suite that help to prevent unintentionally breaking backward or forward compatibility between Neon releases.
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ from dataclasses import dataclass
|
|||||||
from typing import Any, Dict, Iterable, Tuple
|
from typing import Any, Dict, Iterable, Tuple
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import Lsn, TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
NeonEnv,
|
NeonEnv,
|
||||||
@@ -16,7 +17,6 @@ from fixtures.neon_fixtures import (
|
|||||||
from fixtures.pageserver.http import PageserverHttpClient
|
from fixtures.pageserver.http import PageserverHttpClient
|
||||||
from fixtures.pageserver.utils import wait_for_upload_queue_empty
|
from fixtures.pageserver.utils import wait_for_upload_queue_empty
|
||||||
from fixtures.remote_storage import RemoteStorageKind
|
from fixtures.remote_storage import RemoteStorageKind
|
||||||
from fixtures.types import Lsn, TenantId, TimelineId
|
|
||||||
from fixtures.utils import wait_until
|
from fixtures.utils import wait_until
|
||||||
|
|
||||||
GLOBAL_LRU_LOG_LINE = "tenant_min_resident_size-respecting LRU would not relieve pressure, evicting more following global LRU policy"
|
GLOBAL_LRU_LOG_LINE = "tenant_min_resident_size-respecting LRU would not relieve pressure, evicting more following global LRU policy"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import time
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from fixtures.neon_fixtures import NeonEnvBuilder, PgBin, wait_for_last_flush_lsn
|
from fixtures.neon_fixtures import NeonEnvBuilder, PgBin, wait_for_last_flush_lsn
|
||||||
from fixtures.pageserver.types import parse_layer_file_name
|
from fixtures.pageserver.common_types import parse_layer_file_name
|
||||||
from fixtures.pageserver.utils import (
|
from fixtures.pageserver.utils import (
|
||||||
wait_for_last_record_lsn,
|
wait_for_last_record_lsn,
|
||||||
wait_for_upload_queue_empty,
|
wait_for_upload_queue_empty,
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
from fixtures.common_types import Lsn, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
NeonEnvBuilder,
|
NeonEnvBuilder,
|
||||||
@@ -8,7 +9,6 @@ from fixtures.neon_fixtures import (
|
|||||||
VanillaPostgres,
|
VanillaPostgres,
|
||||||
)
|
)
|
||||||
from fixtures.port_distributor import PortDistributor
|
from fixtures.port_distributor import PortDistributor
|
||||||
from fixtures.types import Lsn, TimelineId
|
|
||||||
from fixtures.utils import query_scalar, subprocess_capture
|
from fixtures.utils import query_scalar, subprocess_capture
|
||||||
|
|
||||||
num_rows = 1000
|
num_rows = 1000
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import asyncio
|
|||||||
import concurrent.futures
|
import concurrent.futures
|
||||||
import random
|
import random
|
||||||
|
|
||||||
|
from fixtures.common_types import TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
Endpoint,
|
Endpoint,
|
||||||
@@ -10,7 +11,6 @@ from fixtures.neon_fixtures import (
|
|||||||
wait_for_last_flush_lsn,
|
wait_for_last_flush_lsn,
|
||||||
)
|
)
|
||||||
from fixtures.remote_storage import RemoteStorageKind
|
from fixtures.remote_storage import RemoteStorageKind
|
||||||
from fixtures.types import TimelineId
|
|
||||||
|
|
||||||
# Test configuration
|
# Test configuration
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ from contextlib import closing
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import Lsn, TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
Endpoint,
|
Endpoint,
|
||||||
@@ -20,7 +21,6 @@ from fixtures.pageserver.utils import (
|
|||||||
wait_for_upload,
|
wait_for_upload,
|
||||||
)
|
)
|
||||||
from fixtures.remote_storage import RemoteStorageKind
|
from fixtures.remote_storage import RemoteStorageKind
|
||||||
from fixtures.types import Lsn, TenantId, TimelineId
|
|
||||||
from fixtures.utils import subprocess_capture
|
from fixtures.utils import subprocess_capture
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ from fixtures.neon_fixtures import (
|
|||||||
flush_ep_to_pageserver,
|
flush_ep_to_pageserver,
|
||||||
wait_for_last_flush_lsn,
|
wait_for_last_flush_lsn,
|
||||||
)
|
)
|
||||||
from fixtures.pageserver.types import parse_layer_file_name
|
from fixtures.pageserver.common_types import parse_layer_file_name
|
||||||
from fixtures.pageserver.utils import wait_for_upload
|
from fixtures.pageserver.utils import wait_for_upload
|
||||||
from fixtures.remote_storage import RemoteStorageKind
|
from fixtures.remote_storage import RemoteStorageKind
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
|
from fixtures.common_types import Lsn
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import NeonEnvBuilder, flush_ep_to_pageserver
|
from fixtures.neon_fixtures import NeonEnvBuilder, flush_ep_to_pageserver
|
||||||
from fixtures.pageserver.types import (
|
from fixtures.pageserver.common_types import (
|
||||||
DeltaLayerName,
|
DeltaLayerName,
|
||||||
ImageLayerName,
|
ImageLayerName,
|
||||||
is_future_layer,
|
is_future_layer,
|
||||||
@@ -13,7 +14,6 @@ from fixtures.pageserver.utils import (
|
|||||||
wait_until_tenant_active,
|
wait_until_tenant_active,
|
||||||
)
|
)
|
||||||
from fixtures.remote_storage import LocalFsStorage, RemoteStorageKind
|
from fixtures.remote_storage import LocalFsStorage, RemoteStorageKind
|
||||||
from fixtures.types import Lsn
|
|
||||||
from fixtures.utils import query_scalar, wait_until
|
from fixtures.utils import query_scalar, wait_until
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ from random import choice
|
|||||||
from string import ascii_lowercase
|
from string import ascii_lowercase
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import Lsn
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
AuxFileStore,
|
AuxFileStore,
|
||||||
@@ -12,7 +13,6 @@ from fixtures.neon_fixtures import (
|
|||||||
logical_replication_sync,
|
logical_replication_sync,
|
||||||
wait_for_last_flush_lsn,
|
wait_for_last_flush_lsn,
|
||||||
)
|
)
|
||||||
from fixtures.types import Lsn
|
|
||||||
from fixtures.utils import query_scalar, wait_until
|
from fixtures.utils import query_scalar, wait_until
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ import re
|
|||||||
import time
|
import time
|
||||||
from datetime import datetime, timedelta, timezone
|
from datetime import datetime, timedelta, timezone
|
||||||
|
|
||||||
|
from fixtures.common_types import Lsn
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import NeonEnvBuilder, wait_for_last_flush_lsn
|
from fixtures.neon_fixtures import NeonEnvBuilder, wait_for_last_flush_lsn
|
||||||
from fixtures.pageserver.http import PageserverApiException
|
from fixtures.pageserver.http import PageserverApiException
|
||||||
from fixtures.types import Lsn
|
|
||||||
from fixtures.utils import query_scalar
|
from fixtures.utils import query_scalar
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ from typing import cast
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
|
from fixtures.common_types import TenantId, TimelineId
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
DEFAULT_BRANCH_NAME,
|
DEFAULT_BRANCH_NAME,
|
||||||
NeonEnv,
|
NeonEnv,
|
||||||
@@ -13,7 +14,6 @@ from fixtures.neon_fixtures import (
|
|||||||
)
|
)
|
||||||
from fixtures.pageserver.http import PageserverHttpClient
|
from fixtures.pageserver.http import PageserverHttpClient
|
||||||
from fixtures.pg_version import PgVersion, skip_on_postgres
|
from fixtures.pg_version import PgVersion, skip_on_postgres
|
||||||
from fixtures.types import TenantId, TimelineId
|
|
||||||
|
|
||||||
|
|
||||||
def helper_compare_timeline_list(
|
def helper_compare_timeline_list(
|
||||||
|
|||||||
@@ -3,13 +3,13 @@ import os
|
|||||||
import time
|
import time
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
from fixtures.common_types import Lsn, TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import NeonEnvBuilder, wait_for_wal_insert_lsn
|
from fixtures.neon_fixtures import NeonEnvBuilder, wait_for_wal_insert_lsn
|
||||||
from fixtures.pageserver.utils import (
|
from fixtures.pageserver.utils import (
|
||||||
wait_for_last_record_lsn,
|
wait_for_last_record_lsn,
|
||||||
)
|
)
|
||||||
from fixtures.remote_storage import RemoteStorageKind
|
from fixtures.remote_storage import RemoteStorageKind
|
||||||
from fixtures.types import Lsn, TenantId, TimelineId
|
|
||||||
from fixtures.utils import query_scalar
|
from fixtures.utils import query_scalar
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
from fixtures.common_types import TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import NeonEnvBuilder
|
from fixtures.neon_fixtures import NeonEnvBuilder
|
||||||
from fixtures.types import TimelineId
|
|
||||||
from fixtures.utils import print_gc_result, query_scalar
|
from fixtures.utils import print_gc_result, query_scalar
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import time
|
|||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from typing import Any, DefaultDict, Dict, Tuple
|
from typing import Any, DefaultDict, Dict, Tuple
|
||||||
|
|
||||||
|
from fixtures.common_types import Lsn
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
NeonEnvBuilder,
|
NeonEnvBuilder,
|
||||||
@@ -21,7 +22,6 @@ from fixtures.pageserver.utils import (
|
|||||||
wait_until_tenant_active,
|
wait_until_tenant_active,
|
||||||
)
|
)
|
||||||
from fixtures.remote_storage import RemoteStorageKind
|
from fixtures.remote_storage import RemoteStorageKind
|
||||||
from fixtures.types import Lsn
|
|
||||||
from fixtures.utils import query_scalar, wait_until
|
from fixtures.utils import query_scalar, wait_until
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import Lsn
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import NeonEnvBuilder, tenant_get_shards
|
from fixtures.neon_fixtures import NeonEnvBuilder, tenant_get_shards
|
||||||
from fixtures.types import Lsn
|
|
||||||
from fixtures.utils import query_scalar
|
from fixtures.utils import query_scalar
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,13 +3,13 @@ from pathlib import Path
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
import toml
|
import toml
|
||||||
|
from fixtures.common_types import Lsn, TenantId, TimelineId
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
DEFAULT_BRANCH_NAME,
|
DEFAULT_BRANCH_NAME,
|
||||||
NeonEnv,
|
NeonEnv,
|
||||||
NeonEnvBuilder,
|
NeonEnvBuilder,
|
||||||
)
|
)
|
||||||
from fixtures.pageserver.http import PageserverHttpClient
|
from fixtures.pageserver.http import PageserverHttpClient
|
||||||
from fixtures.types import Lsn, TenantId, TimelineId
|
|
||||||
from fixtures.utils import wait_until
|
from fixtures.utils import wait_until
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import time
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
NeonEnv,
|
NeonEnv,
|
||||||
@@ -37,7 +38,6 @@ from fixtures.pageserver.utils import (
|
|||||||
from fixtures.remote_storage import (
|
from fixtures.remote_storage import (
|
||||||
RemoteStorageKind,
|
RemoteStorageKind,
|
||||||
)
|
)
|
||||||
from fixtures.types import TenantId, TimelineId
|
|
||||||
from fixtures.utils import print_gc_result, wait_until
|
from fixtures.utils import print_gc_result, wait_until
|
||||||
from fixtures.workload import Workload
|
from fixtures.workload import Workload
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ import json
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from anyio import Path
|
from anyio import Path
|
||||||
|
from fixtures.common_types import TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import NeonEnvBuilder, PgBin
|
from fixtures.neon_fixtures import NeonEnvBuilder, PgBin
|
||||||
from fixtures.pg_version import PgVersion
|
from fixtures.pg_version import PgVersion
|
||||||
from fixtures.types import TenantId, TimelineId
|
|
||||||
from fixtures.utils import wait_until
|
from fixtures.utils import wait_until
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ from typing import Optional, Tuple
|
|||||||
|
|
||||||
import psutil
|
import psutil
|
||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import Lsn, TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
NeonEnv,
|
NeonEnv,
|
||||||
@@ -13,7 +14,6 @@ from fixtures.neon_fixtures import (
|
|||||||
)
|
)
|
||||||
from fixtures.pageserver.http import PageserverHttpClient
|
from fixtures.pageserver.http import PageserverHttpClient
|
||||||
from fixtures.pageserver.utils import wait_for_last_record_lsn, wait_for_upload
|
from fixtures.pageserver.utils import wait_for_last_record_lsn, wait_for_upload
|
||||||
from fixtures.types import Lsn, TenantId, TimelineId
|
|
||||||
from fixtures.utils import wait_until
|
from fixtures.utils import wait_until
|
||||||
|
|
||||||
TIMELINE_COUNT = 10
|
TIMELINE_COUNT = 10
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ from pathlib import Path
|
|||||||
from queue import SimpleQueue
|
from queue import SimpleQueue
|
||||||
from typing import Any, Dict, Set
|
from typing import Any, Dict, Set
|
||||||
|
|
||||||
|
from fixtures.common_types import TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
NeonEnvBuilder,
|
NeonEnvBuilder,
|
||||||
@@ -17,7 +18,6 @@ from fixtures.remote_storage import (
|
|||||||
RemoteStorageKind,
|
RemoteStorageKind,
|
||||||
remote_storage_to_toml_inline_table,
|
remote_storage_to_toml_inline_table,
|
||||||
)
|
)
|
||||||
from fixtures.types import TenantId, TimelineId
|
|
||||||
from pytest_httpserver import HTTPServer
|
from pytest_httpserver import HTTPServer
|
||||||
from werkzeug.wrappers.request import Request
|
from werkzeug.wrappers.request import Request
|
||||||
from werkzeug.wrappers.response import Response
|
from werkzeug.wrappers.response import Response
|
||||||
|
|||||||
@@ -5,9 +5,10 @@ import time
|
|||||||
from typing import Any, Dict, Optional
|
from typing import Any, Dict, Optional
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import NeonEnvBuilder, NeonPageserver, S3Scrubber
|
from fixtures.neon_fixtures import NeonEnvBuilder, NeonPageserver, S3Scrubber
|
||||||
from fixtures.pageserver.types import parse_layer_file_name
|
from fixtures.pageserver.common_types import parse_layer_file_name
|
||||||
from fixtures.pageserver.utils import (
|
from fixtures.pageserver.utils import (
|
||||||
assert_prefix_empty,
|
assert_prefix_empty,
|
||||||
poll_for_remote_storage_iterations,
|
poll_for_remote_storage_iterations,
|
||||||
@@ -15,7 +16,6 @@ from fixtures.pageserver.utils import (
|
|||||||
wait_for_upload_queue_empty,
|
wait_for_upload_queue_empty,
|
||||||
)
|
)
|
||||||
from fixtures.remote_storage import LocalFsStorage, RemoteStorageKind, S3Storage
|
from fixtures.remote_storage import LocalFsStorage, RemoteStorageKind, S3Storage
|
||||||
from fixtures.types import TenantId, TimelineId
|
|
||||||
from fixtures.utils import wait_until
|
from fixtures.utils import wait_until
|
||||||
from fixtures.workload import Workload
|
from fixtures.workload import Workload
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
from fixtures.common_types import TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import NeonEnvBuilder
|
from fixtures.neon_fixtures import NeonEnvBuilder
|
||||||
from fixtures.types import TimelineId
|
|
||||||
from fixtures.utils import print_gc_result, query_scalar
|
from fixtures.utils import print_gc_result, query_scalar
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
from contextlib import closing
|
from contextlib import closing
|
||||||
|
|
||||||
|
from fixtures.common_types import Lsn
|
||||||
from fixtures.neon_fixtures import NeonEnvBuilder
|
from fixtures.neon_fixtures import NeonEnvBuilder
|
||||||
from fixtures.pageserver.utils import wait_for_last_record_lsn
|
from fixtures.pageserver.utils import wait_for_last_record_lsn
|
||||||
from fixtures.types import Lsn
|
|
||||||
from fixtures.utils import query_scalar
|
from fixtures.utils import query_scalar
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import Lsn
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import NeonEnv
|
from fixtures.neon_fixtures import NeonEnv
|
||||||
from fixtures.pageserver.utils import wait_for_last_record_lsn
|
from fixtures.pageserver.utils import wait_for_last_record_lsn
|
||||||
from fixtures.types import Lsn
|
|
||||||
from fixtures.utils import query_scalar
|
from fixtures.utils import query_scalar
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,13 +6,14 @@ import time
|
|||||||
from typing import Dict, List, Optional, Tuple
|
from typing import Dict, List, Optional, Tuple
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import Lsn, TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
NeonEnvBuilder,
|
NeonEnvBuilder,
|
||||||
wait_for_last_flush_lsn,
|
wait_for_last_flush_lsn,
|
||||||
)
|
)
|
||||||
|
from fixtures.pageserver.common_types import parse_layer_file_name
|
||||||
from fixtures.pageserver.http import PageserverApiException, PageserverHttpClient
|
from fixtures.pageserver.http import PageserverApiException, PageserverHttpClient
|
||||||
from fixtures.pageserver.types import parse_layer_file_name
|
|
||||||
from fixtures.pageserver.utils import (
|
from fixtures.pageserver.utils import (
|
||||||
timeline_delete_wait_completed,
|
timeline_delete_wait_completed,
|
||||||
wait_for_last_record_lsn,
|
wait_for_last_record_lsn,
|
||||||
@@ -25,7 +26,6 @@ from fixtures.remote_storage import (
|
|||||||
RemoteStorageKind,
|
RemoteStorageKind,
|
||||||
available_remote_storages,
|
available_remote_storages,
|
||||||
)
|
)
|
||||||
from fixtures.types import Lsn, TenantId, TimelineId
|
|
||||||
from fixtures.utils import (
|
from fixtures.utils import (
|
||||||
assert_eq,
|
assert_eq,
|
||||||
assert_ge,
|
assert_ge,
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import time
|
import time
|
||||||
from datetime import datetime, timezone
|
from datetime import datetime, timezone
|
||||||
|
|
||||||
|
from fixtures.common_types import Lsn
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
NeonEnvBuilder,
|
NeonEnvBuilder,
|
||||||
PgBin,
|
PgBin,
|
||||||
@@ -14,7 +15,6 @@ from fixtures.pageserver.utils import (
|
|||||||
wait_for_upload,
|
wait_for_upload,
|
||||||
)
|
)
|
||||||
from fixtures.remote_storage import RemoteStorageKind, s3_storage
|
from fixtures.remote_storage import RemoteStorageKind, s3_storage
|
||||||
from fixtures.types import Lsn
|
|
||||||
from fixtures.utils import run_pg_bench_small
|
from fixtures.utils import run_pg_bench_small
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ import shutil
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import TenantShardId
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
NeonEnvBuilder,
|
NeonEnvBuilder,
|
||||||
S3Scrubber,
|
S3Scrubber,
|
||||||
)
|
)
|
||||||
from fixtures.remote_storage import S3Storage, s3_storage
|
from fixtures.remote_storage import S3Storage, s3_storage
|
||||||
from fixtures.types import TenantShardId
|
|
||||||
from fixtures.workload import Workload
|
from fixtures.workload import Workload
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ from typing import Dict, List, Optional, Union
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
|
from fixtures.common_types import Lsn, TenantId, TenantShardId, TimelineId
|
||||||
from fixtures.compute_reconfigure import ComputeReconfigure
|
from fixtures.compute_reconfigure import ComputeReconfigure
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
@@ -18,7 +19,6 @@ from fixtures.neon_fixtures import (
|
|||||||
)
|
)
|
||||||
from fixtures.pageserver.utils import assert_prefix_empty, assert_prefix_not_empty
|
from fixtures.pageserver.utils import assert_prefix_empty, assert_prefix_not_empty
|
||||||
from fixtures.remote_storage import s3_storage
|
from fixtures.remote_storage import s3_storage
|
||||||
from fixtures.types import Lsn, TenantId, TenantShardId, TimelineId
|
|
||||||
from fixtures.utils import wait_until
|
from fixtures.utils import wait_until
|
||||||
from fixtures.workload import Workload
|
from fixtures.workload import Workload
|
||||||
from pytest_httpserver import HTTPServer
|
from pytest_httpserver import HTTPServer
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ from datetime import datetime, timezone
|
|||||||
from typing import Any, Dict, List, Union
|
from typing import Any, Dict, List, Union
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import TenantId, TenantShardId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
NeonEnv,
|
NeonEnv,
|
||||||
@@ -25,7 +26,6 @@ from fixtures.pageserver.utils import (
|
|||||||
)
|
)
|
||||||
from fixtures.pg_version import PgVersion
|
from fixtures.pg_version import PgVersion
|
||||||
from fixtures.remote_storage import RemoteStorageKind, s3_storage
|
from fixtures.remote_storage import RemoteStorageKind, s3_storage
|
||||||
from fixtures.types import TenantId, TenantShardId, TimelineId
|
|
||||||
from fixtures.utils import run_pg_bench_small, subprocess_capture, wait_until
|
from fixtures.utils import run_pg_bench_small, subprocess_capture, wait_until
|
||||||
from fixtures.workload import Workload
|
from fixtures.workload import Workload
|
||||||
from mypy_boto3_s3.type_defs import (
|
from mypy_boto3_s3.type_defs import (
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ import json
|
|||||||
from contextlib import closing
|
from contextlib import closing
|
||||||
|
|
||||||
import psycopg2.extras
|
import psycopg2.extras
|
||||||
|
from fixtures.common_types import Lsn
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
NeonEnvBuilder,
|
NeonEnvBuilder,
|
||||||
)
|
)
|
||||||
from fixtures.pageserver.utils import assert_tenant_state, wait_for_upload
|
from fixtures.pageserver.utils import assert_tenant_state, wait_for_upload
|
||||||
from fixtures.remote_storage import LocalFsStorage, RemoteStorageKind
|
from fixtures.remote_storage import LocalFsStorage, RemoteStorageKind
|
||||||
from fixtures.types import Lsn
|
|
||||||
from fixtures.utils import wait_until
|
from fixtures.utils import wait_until
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import shutil
|
|||||||
from threading import Thread
|
from threading import Thread
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import Lsn, TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
NeonEnvBuilder,
|
NeonEnvBuilder,
|
||||||
@@ -26,7 +27,6 @@ from fixtures.pageserver.utils import (
|
|||||||
wait_until_tenant_state,
|
wait_until_tenant_state,
|
||||||
)
|
)
|
||||||
from fixtures.remote_storage import RemoteStorageKind, available_s3_storages, s3_storage
|
from fixtures.remote_storage import RemoteStorageKind, available_s3_storages, s3_storage
|
||||||
from fixtures.types import Lsn, TenantId, TimelineId
|
|
||||||
from fixtures.utils import run_pg_bench_small, wait_until
|
from fixtures.utils import run_pg_bench_small, wait_until
|
||||||
from requests.exceptions import ReadTimeout
|
from requests.exceptions import ReadTimeout
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ from typing import List, Optional
|
|||||||
|
|
||||||
import asyncpg
|
import asyncpg
|
||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import Lsn, TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
Endpoint,
|
Endpoint,
|
||||||
@@ -22,7 +23,6 @@ from fixtures.pageserver.utils import (
|
|||||||
from fixtures.remote_storage import (
|
from fixtures.remote_storage import (
|
||||||
RemoteStorageKind,
|
RemoteStorageKind,
|
||||||
)
|
)
|
||||||
from fixtures.types import Lsn, TenantId, TimelineId
|
|
||||||
from fixtures.utils import query_scalar, wait_until
|
from fixtures.utils import query_scalar, wait_until
|
||||||
from prometheus_client.samples import Sample
|
from prometheus_client.samples import Sample
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ from pathlib import Path
|
|||||||
from typing import Any, Dict, Optional, Tuple
|
from typing import Any, Dict, Optional, Tuple
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import Lsn, TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import Endpoint, NeonEnvBuilder, NeonPageserver
|
from fixtures.neon_fixtures import Endpoint, NeonEnvBuilder, NeonPageserver
|
||||||
from fixtures.pageserver.http import PageserverHttpClient
|
from fixtures.pageserver.http import PageserverHttpClient
|
||||||
@@ -20,7 +21,6 @@ from fixtures.remote_storage import (
|
|||||||
LocalFsStorage,
|
LocalFsStorage,
|
||||||
RemoteStorageKind,
|
RemoteStorageKind,
|
||||||
)
|
)
|
||||||
from fixtures.types import Lsn, TenantId, TimelineId
|
|
||||||
from fixtures.utils import (
|
from fixtures.utils import (
|
||||||
query_scalar,
|
query_scalar,
|
||||||
wait_until,
|
wait_until,
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ from pathlib import Path
|
|||||||
from typing import List, Tuple
|
from typing import List, Tuple
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import Lsn, TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
Endpoint,
|
Endpoint,
|
||||||
@@ -19,7 +20,6 @@ from fixtures.pageserver.utils import (
|
|||||||
wait_until_tenant_active,
|
wait_until_tenant_active,
|
||||||
)
|
)
|
||||||
from fixtures.pg_version import PgVersion
|
from fixtures.pg_version import PgVersion
|
||||||
from fixtures.types import Lsn, TenantId, TimelineId
|
|
||||||
from fixtures.utils import wait_until
|
from fixtures.utils import wait_until
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
from fixtures.common_types import TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import NeonEnvBuilder
|
from fixtures.neon_fixtures import NeonEnvBuilder
|
||||||
from fixtures.pageserver.utils import (
|
from fixtures.pageserver.utils import (
|
||||||
@@ -5,7 +6,6 @@ from fixtures.pageserver.utils import (
|
|||||||
timeline_delete_wait_completed,
|
timeline_delete_wait_completed,
|
||||||
wait_until_tenant_active,
|
wait_until_tenant_active,
|
||||||
)
|
)
|
||||||
from fixtures.types import TenantId, TimelineId
|
|
||||||
from fixtures.utils import wait_until
|
from fixtures.utils import wait_until
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ from typing import List
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
|
from fixtures.common_types import Lsn, TenantId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.metrics import (
|
from fixtures.metrics import (
|
||||||
PAGESERVER_GLOBAL_METRICS,
|
PAGESERVER_GLOBAL_METRICS,
|
||||||
@@ -24,7 +25,6 @@ from fixtures.pageserver.http import PageserverApiException
|
|||||||
from fixtures.pageserver.utils import timeline_delete_wait_completed, wait_until_tenant_active
|
from fixtures.pageserver.utils import timeline_delete_wait_completed, wait_until_tenant_active
|
||||||
from fixtures.pg_version import PgVersion
|
from fixtures.pg_version import PgVersion
|
||||||
from fixtures.remote_storage import RemoteStorageKind
|
from fixtures.remote_storage import RemoteStorageKind
|
||||||
from fixtures.types import Lsn, TenantId
|
|
||||||
from fixtures.utils import wait_until
|
from fixtures.utils import wait_until
|
||||||
from prometheus_client.samples import Sample
|
from prometheus_client.samples import Sample
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import os
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List, Tuple
|
from typing import List, Tuple
|
||||||
|
|
||||||
|
from fixtures.common_types import Lsn, TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
Endpoint,
|
Endpoint,
|
||||||
@@ -18,7 +19,7 @@ from fixtures.neon_fixtures import (
|
|||||||
NeonEnvBuilder,
|
NeonEnvBuilder,
|
||||||
last_flush_lsn_upload,
|
last_flush_lsn_upload,
|
||||||
)
|
)
|
||||||
from fixtures.pageserver.types import parse_layer_file_name
|
from fixtures.pageserver.common_types import parse_layer_file_name
|
||||||
from fixtures.pageserver.utils import (
|
from fixtures.pageserver.utils import (
|
||||||
assert_tenant_state,
|
assert_tenant_state,
|
||||||
wait_for_last_record_lsn,
|
wait_for_last_record_lsn,
|
||||||
@@ -28,7 +29,6 @@ from fixtures.remote_storage import (
|
|||||||
LocalFsStorage,
|
LocalFsStorage,
|
||||||
RemoteStorageKind,
|
RemoteStorageKind,
|
||||||
)
|
)
|
||||||
from fixtures.types import Lsn, TenantId, TimelineId
|
|
||||||
from fixtures.utils import query_scalar, wait_until
|
from fixtures.utils import query_scalar, wait_until
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import threading
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
|
from fixtures.common_types import Lsn, TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
NeonEnv,
|
NeonEnv,
|
||||||
@@ -31,7 +32,6 @@ from fixtures.remote_storage import (
|
|||||||
RemoteStorageKind,
|
RemoteStorageKind,
|
||||||
s3_storage,
|
s3_storage,
|
||||||
)
|
)
|
||||||
from fixtures.types import Lsn, TenantId, TimelineId
|
|
||||||
from fixtures.utils import query_scalar, run_pg_bench_small, wait_until
|
from fixtures.utils import query_scalar, run_pg_bench_small, wait_until
|
||||||
from urllib3.util.retry import Retry
|
from urllib3.util.retry import Retry
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ from threading import Barrier
|
|||||||
from typing import IO, List, Set, Tuple, Union
|
from typing import IO, List, Set, Tuple, Union
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import Lsn, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
NeonEnvBuilder,
|
NeonEnvBuilder,
|
||||||
@@ -19,7 +20,6 @@ from fixtures.neon_fixtures import (
|
|||||||
from fixtures.pageserver.http import HistoricLayerInfo
|
from fixtures.pageserver.http import HistoricLayerInfo
|
||||||
from fixtures.pageserver.utils import wait_timeline_detail_404
|
from fixtures.pageserver.utils import wait_timeline_detail_404
|
||||||
from fixtures.remote_storage import LocalFsStorage
|
from fixtures.remote_storage import LocalFsStorage
|
||||||
from fixtures.types import Lsn, TimelineId
|
|
||||||
|
|
||||||
|
|
||||||
def by_end_lsn(info: HistoricLayerInfo) -> Lsn:
|
def by_end_lsn(info: HistoricLayerInfo) -> Lsn:
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ from typing import Optional
|
|||||||
import psycopg2.errors
|
import psycopg2.errors
|
||||||
import psycopg2.extras
|
import psycopg2.extras
|
||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
Endpoint,
|
Endpoint,
|
||||||
@@ -31,7 +32,6 @@ from fixtures.pageserver.utils import (
|
|||||||
from fixtures.pg_version import PgVersion
|
from fixtures.pg_version import PgVersion
|
||||||
from fixtures.port_distributor import PortDistributor
|
from fixtures.port_distributor import PortDistributor
|
||||||
from fixtures.remote_storage import RemoteStorageKind
|
from fixtures.remote_storage import RemoteStorageKind
|
||||||
from fixtures.types import TenantId, TimelineId
|
|
||||||
from fixtures.utils import get_timeline_dir_size, wait_until
|
from fixtures.utils import get_timeline_dir_size, wait_until
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import psycopg2.errors
|
|||||||
import psycopg2.extras
|
import psycopg2.extras
|
||||||
import pytest
|
import pytest
|
||||||
from fixtures.broker import NeonBroker
|
from fixtures.broker import NeonBroker
|
||||||
|
from fixtures.common_types import Lsn, TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.metrics import parse_metrics
|
from fixtures.metrics import parse_metrics
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
@@ -47,7 +48,6 @@ from fixtures.remote_storage import (
|
|||||||
)
|
)
|
||||||
from fixtures.safekeeper.http import SafekeeperHttpClient
|
from fixtures.safekeeper.http import SafekeeperHttpClient
|
||||||
from fixtures.safekeeper.utils import are_walreceivers_absent
|
from fixtures.safekeeper.utils import are_walreceivers_absent
|
||||||
from fixtures.types import Lsn, TenantId, TimelineId
|
|
||||||
from fixtures.utils import get_dir_size, query_scalar, start_in_background
|
from fixtures.utils import get_dir_size, query_scalar, start_in_background
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ from typing import List, Optional
|
|||||||
import asyncpg
|
import asyncpg
|
||||||
import pytest
|
import pytest
|
||||||
import toml
|
import toml
|
||||||
|
from fixtures.common_types import Lsn, TenantId, TimelineId
|
||||||
from fixtures.log_helper import getLogger
|
from fixtures.log_helper import getLogger
|
||||||
from fixtures.neon_fixtures import Endpoint, NeonEnv, NeonEnvBuilder, Safekeeper
|
from fixtures.neon_fixtures import Endpoint, NeonEnv, NeonEnvBuilder, Safekeeper
|
||||||
from fixtures.remote_storage import RemoteStorageKind
|
from fixtures.remote_storage import RemoteStorageKind
|
||||||
from fixtures.types import Lsn, TenantId, TimelineId
|
|
||||||
|
|
||||||
log = getLogger("root.safekeeper_async")
|
log = getLogger("root.safekeeper_async")
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
|
from fixtures.common_types import Lsn, TenantId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import NeonEnv, NeonEnvBuilder
|
from fixtures.neon_fixtures import NeonEnv, NeonEnvBuilder
|
||||||
from fixtures.types import Lsn, TenantId
|
|
||||||
|
|
||||||
|
|
||||||
# Checks that pageserver's walreceiver state is printed in the logs during WAL wait timeout.
|
# Checks that pageserver's walreceiver state is printed in the logs during WAL wait timeout.
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ from typing import List
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import zstandard
|
import zstandard
|
||||||
|
from fixtures.common_types import Lsn, TenantId, TimelineId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import (
|
from fixtures.neon_fixtures import (
|
||||||
NeonEnvBuilder,
|
NeonEnvBuilder,
|
||||||
@@ -19,7 +20,6 @@ from fixtures.pageserver.utils import (
|
|||||||
)
|
)
|
||||||
from fixtures.port_distributor import PortDistributor
|
from fixtures.port_distributor import PortDistributor
|
||||||
from fixtures.remote_storage import LocalFsStorage, S3Storage, s3_storage
|
from fixtures.remote_storage import LocalFsStorage, S3Storage, s3_storage
|
||||||
from fixtures.types import Lsn, TenantId, TimelineId
|
|
||||||
from mypy_boto3_s3.type_defs import (
|
from mypy_boto3_s3.type_defs import (
|
||||||
ObjectTypeDef,
|
ObjectTypeDef,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ import time
|
|||||||
|
|
||||||
import psutil
|
import psutil
|
||||||
import pytest
|
import pytest
|
||||||
|
from fixtures.common_types import TenantId
|
||||||
from fixtures.log_helper import log
|
from fixtures.log_helper import log
|
||||||
from fixtures.neon_fixtures import NeonEnvBuilder
|
from fixtures.neon_fixtures import NeonEnvBuilder
|
||||||
from fixtures.pageserver.http import PageserverApiException
|
from fixtures.pageserver.http import PageserverApiException
|
||||||
from fixtures.types import TenantId
|
|
||||||
|
|
||||||
|
|
||||||
def assert_child_processes(pageserver_pid, wal_redo_present=False, defunct_present=False):
|
def assert_child_processes(pageserver_pid, wal_redo_present=False, defunct_present=False):
|
||||||
|
|||||||
Reference in New Issue
Block a user