Skip to content

Commit

Permalink
tests: Remove redundant log lines when starting an endpoint (#9316)
Browse files Browse the repository at this point in the history
The "Starting postgres endpoint <name>" message is not needed, because
the neon_cli.py prints the neon_local command line used to start the
endpoint. That contains the same information. The "Postgres startup took
XX seconds" message is not very useful because no one pays attention to
those in the python test logs when things are going smoothly, and if you
do wonder about the startup speed, the same information and more can be
found in the compute log.

Before:

    2024-10-07 22:32:27.794 INFO [neon_fixtures.py:3492] Starting postgres endpoint ep-1
    2024-10-07 22:32:27.794 INFO [neon_cli.py:73] Running command "/tmp/neon/bin/neon_local endpoint start --safekeepers 1 ep-1"
    2024-10-07 22:32:27.901 INFO [neon_fixtures.py:3690] Postgres startup took 0.11398935317993164 seconds

After:

    2024-10-07 22:32:27.794 INFO [neon_cli.py:73] Running command "/tmp/neon/bin/neon_local endpoint start --safekeepers 1 ep-1"
  • Loading branch information
hlinnaka authored Oct 9, 2024
1 parent e8ae376 commit f87f5a3
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions test_runner/fixtures/neon_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -3485,8 +3485,6 @@ def start(
if safekeepers is not None:
self.active_safekeepers = safekeepers

log.info(f"Starting postgres endpoint {self.endpoint_id}")

self.env.neon_cli.endpoint_start(
self.endpoint_id,
safekeepers=self.active_safekeepers,
Expand Down Expand Up @@ -3666,8 +3664,6 @@ def create_start(
Returns self.
"""

started_at = time.time()

self.create(
branch_name=branch_name,
endpoint_id=endpoint_id,
Expand All @@ -3683,8 +3679,6 @@ def create_start(
basebackup_request_tries=basebackup_request_tries,
)

log.info(f"Postgres startup took {time.time() - started_at} seconds")

return self

def __enter__(self) -> Endpoint:
Expand Down

1 comment on commit f87f5a3

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5085 tests run: 4878 passed, 0 failed, 207 skipped (full report)


Code coverage* (full report)

  • functions: 31.3% (7505 of 23958 functions)
  • lines: 49.5% (60273 of 121883 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
f87f5a3 at 2024-10-09T09:54:29.474Z :recycle:

Please sign in to comment.