8000 unittest: improve detection of whether or not we can run `--force-restart` tests by Mytherin · Pull Request #17419 · duckdb/duckdb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

unittest: improve detection of whether or not we can run --force-restart tests #17419

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

Merged
merged 3 commits into from
May 9, 2025

Conversation

Mytherin
Copy link
Collaborator
@Mytherin Mytherin commented May 8, 2025

The --force-restart tests are useful to stress test database restarts by restarting in between each statement - but we cannot always restart since we have transient state (e.g. attached databases, prepared statements, etc). Restarting will then lead to failing the test. For tests that have this transient state we have been accumulating a lot of require skip_reload flags. This is undesirable since this often breaks CI only in the final stages of a PR (at which point these skips are added).

This PR instead improves detection on when we can restart, allowing almost all of the require skip_reload flags in tests to be removed. In particular:

  • We cannot restart if there are any attached databases (new)
  • We cannot restart if there are any TEMPORARY structures (tables, views, etc) (new)
  • We cannot restart if a random seed has been set (new)
  • We cannot restart if there are any prepared statements
  • We cannot restart if we are in the middle of a transaction

We introduce new syntax for specifying seeds in the tests:

set seed 0.42

This syntax sets the seed, and also disables the force restart tests.

Mytherin added 3 commits May 8, 2025 13:18
… tests automatically when there are, avoiding us requiring many skip_reload flags in the test suite
…les reloading, and remove skip_reload from many tests
@Mytherin Mytherin merged commit ebecbe2 into duckdb:main May 9, 2025
47 checks passed
krlmlr added a commit to duckdb/duckdb-r that referenced this pull request May 18, 2025
unittest: improve detection of whether or not we can run `--force-restart` tests (duckdb/duckdb#17419)
krlmlr added a commit to duckdb/duckdb-r that referenced this pull request May 18, 2025
unittest: improve detection of whether or not we can run `--force-restart` tests (duckdb/duckdb#17419)
krlmlr added a commit to duckdb/duckdb-r that referenced this pull request May 19, 2025
unittest: improve detection of whether or not we can run `--force-restart` tests (duckdb/duckdb#17419)
krlmlr added a commit to duckdb/duckdb-r that referenced this pull request May 19, 2025
unittest: improve detection of whether or not we can run `--force-restart` tests (duckdb/duckdb#17419)
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.

1 participant
0