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

Centralize Rust integration and regression tests #753

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

sonhmai
Copy link
Contributor

@sonhmai sonhmai commented Jan 20, 2025

What?

  • centralized Rust integration and regression tests
  • no new tests added
  • no tests removed
  • only refactored tests into modules and common utils

Why?

  • @penberg and I have a discussion here about centralizing the integration/ regression tests so that they are not scattered around.
  • this is a PR to do that and some refactor of the existing tests to make the structure easier to navigate + add new tests in the future.

@sonhmai
Copy link
Contributor Author

sonhmai commented Jan 20, 2025

clippy 😁 -> todo

@penberg
Copy link
Collaborator

penberg commented Jan 20, 2025

@PThorpe92 @jussisaurio @pereman2 please have a look. I think we should do this.

Copy link
Collaborator

@jussisaurio jussisaurio left a comment

Choose a reason for hiding this comment

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

looketh goodeth to meeth

Copy link
Collaborator

@pereman2 pereman2 left a comment

Choose a reason for hiding this comment

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

Can we rename journal to wal ? Limbo does not have a journal mode so I think it is misleading.

Moreover, I find it confusing now because before I had all my insert tests in a single place where I could easily just jump around the file. Now I have test_wal.rs test_insert.rs and test_overflow.rs which all have a single function in them which makes, imho, hard to navigate.

@penberg
Copy link
Collaborator

penberg commented Jan 20, 2025

@pereman2 What would you prefer here? All I want to do is move tests to top-level tests for discoverability and cleaning up duplicate code, but no point in making things harder for development

@pereman2
Copy link
Collaborator

@penberg Just merge test_insert and test_overflow and do the journal changes. If you all are happy with it I won't block it.

@sonhmai sonhmai force-pushed the chore/centralized-tests branch from c530885 to a090fb9 Compare January 21, 2025 08:42
@sonhmai
Copy link
Contributor Author

sonhmai commented Jan 21, 2025

hey guys thanks for the reviews! @penberg @pereman2 @jussisaurio @PThorpe92

I made some changes

  1. keep tests for write path from @pereman2 in one file, now in tests/integration/query_processing/test_write_path.rs. Sorry for causing it hard to navigate for your original tests.
  2. not using the journal word.
  3. fix the clippy thingy of not linting test code resulting in many never used errors by marking the tests [[test]]
  4. calling the folder tests instead test to be a bit Rust-conventional :)

It is ready to go in now.

BTW this is a bit off topic, but there is also the journal_mode rollback.
(This is why I named the module journal - to have also tests for rollback journal next to wal later)
Have we decided architecturally not to have this and have only wal for limbo? Or this is just not implemented yet.

Copy link
Collaborator

@pereman2 pereman2 left a comment

Choose a reason for hiding this comment

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

Looks good! wal will be the only journal mode supported that's why I proposed that.

@jussisaurio jussisaurio merged commit 5b00e41 into tursodatabase:main Jan 21, 2025
37 checks passed
@sonhmai sonhmai deleted the chore/centralized-tests branch January 21, 2025 09:59
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.

5 participants