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: globals in tests #5298

Merged
merged 7 commits into from
Sep 13, 2023
Merged

Conversation

koivunej
Copy link
Member

@koivunej koivunej commented Sep 13, 2023

Refactor tests to have less globals.

This will allow to hopefully write more complex tests for our new metric collection requirements in #5297. Includes reverted work from #4761 related to test globals.

@github-actions
Copy link

github-actions bot commented Sep 13, 2023

2472 tests run: 2352 passed, 0 failed, 120 skipped (full report)


Flaky tests (6)

Postgres 16

Postgres 14

  • test_download_remote_layers_api[local_fs]: release
  • test_get_tenant_size_with_multiple_branches: debug

Code coverage (full report)

  • functions: 53.1% (7669 of 14453 functions)
  • lines: 81.0% (44774 of 55281 lines)

The comment gets automatically updated with the latest test results
639b243 at 2023-09-13T18:38:45.575Z :recycle:

@bayandin
Copy link
Member

bayandin commented Sep 13, 2023

Tests with globals have failed.
Going to restore the fixed by @MMeent from Postgres 16 branch (reverted in 0c68972)

@bayandin bayandin force-pushed the refactor_consumption_metrics_test_1 branch from cb36f41 to 520024a Compare September 13, 2023 11:44
@koivunej
Copy link
Member Author

Oh nice, only these failures.

@koivunej koivunej changed the title refactor: consumption metrics tests refactor: globals in tests Sep 13, 2023
@koivunej koivunej marked this pull request as ready for review September 13, 2023 17:58
Copy link
Member

@bayandin bayandin left a comment

Choose a reason for hiding this comment

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

Fight globalisation 💪

@koivunej koivunej enabled auto-merge (squash) September 13, 2023 18:14
@koivunej koivunej disabled auto-merge September 13, 2023 18:14
@koivunej koivunej enabled auto-merge (squash) September 13, 2023 18:15
@koivunej koivunej merged commit ffd146c into main Sep 13, 2023
@koivunej koivunej deleted the refactor_consumption_metrics_test_1 branch September 13, 2023 19:05
koivunej added a commit that referenced this pull request Sep 28, 2023
Part of #5172. Builds upon #5243, #5298. Includes the test changes:
- no more RemoteStorageKind.NOOP
- no more testing of pageserver without remote storage
- benchmarks now use LOCAL_FS as well

Support for running without RemoteStorage is still kept but in practice,
there are no tests and should not be any tests.

Co-authored-by: Christian Schwarz <[email protected]>
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