Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(test): duplication with fullbackup, tar content hashing #7828

Merged
merged 6 commits into from
May 22, 2024

Conversation

koivunej
Copy link
Member

@koivunej koivunej commented May 21, 2024

"taking a fullbackup" is an ugly multi-liner copypasted in multiple places, most recently with timeline ancestor detach tests. move it under PgBin which is not a great place, but better than yet another utility function.

Additionally:

  • cleanup psql_env repetition (PgBin already configures that)
  • move the backup tar comparison as a yet another free utility function
  • use backup tar comparison in test_import.py where a size check was done previously
  • cleanup extra timeline creation from test

Cc: #7715

@koivunej koivunej requested a review from arpad-m May 21, 2024 17:12
Copy link

github-actions bot commented May 21, 2024

3096 tests run: 2969 passed, 0 failed, 127 skipped (full report)


Flaky tests (1)

Postgres 15

  • test_vm_bit_clear_on_heap_lock: release

Code coverage* (full report)

  • functions: 31.4% (6414 of 20425 functions)
  • lines: 48.0% (49312 of 102661 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
545c8df at 2024-05-21T21:31:41.083Z :recycle:

Comment on lines +26 to +29
# endpoint needs to be alive until the fullbackup so that we have
# prev_record_lsn for the vanilla_pg to start in read-write mode
# for some reason this does not happen if endpoint is shutdown.
endpoint_main = env.endpoints.create_start("main")
Copy link
Member Author

@koivunej koivunej May 21, 2024

Choose a reason for hiding this comment

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

I do not understand this, it doesn't make any sense...

With previous version the prev_record_lsn was 0/0 and vanilla_pg refused to start (as expected): https://neon-github-public-dev.s3.amazonaws.com/reports/pr-7828/9178645043/index.html#suites/564b8e3fb116e6760ef9787f7b0225db/802b3bddaf6b4a1e/

@koivunej koivunej marked this pull request as ready for review May 21, 2024 22:21
@koivunej koivunej enabled auto-merge (squash) May 21, 2024 23:17
@koivunej koivunej disabled auto-merge May 22, 2024 12:25
@koivunej koivunej merged commit df9ab1b into main May 22, 2024
56 checks passed
@koivunej koivunej deleted the joonas/refactor_test_repetition branch May 22, 2024 12:43
koivunej added a commit that referenced this pull request May 23, 2024
With #7828 and proper fullbackup testing the test became flaky
([evidence]).

- produce better assertion messages in `assert_pageserver_backups_equal`
- use read only endpoint to confirm the row count

[evidence]:
https://neon-github-public-dev.s3.amazonaws.com/reports/pr-7839/9192447962/index.html#suites/89cfa994d71769e01e3fc4f475a1f3fa/49009214d0f8b8ce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants