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

Add tests for Generic JDBC support for Postgres, SQLite #12300

Open
wants to merge 61 commits into
base: develop
Choose a base branch
from

Conversation

GregoryTravis
Copy link
Contributor

@GregoryTravis GregoryTravis commented Feb 17, 2025

Since we have full support for these backends, generic JDBC use will be rare. But the drivers are already available, and we need tests for multiple backends.

The original tests are now in H2_Spec.enso.

Some features (catalogs, schemas) are only tested for H2. The behavior of these methods vary greatly between backends so it is not important to build tests for them for each backend.

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.
  • If meaningful changes were made to logic or tests affecting Enso Cloud integration in the libraries,
    or the Snowflake database integration, a run of the Extra Tests has been scheduled.
    • If applicable, it is suggested to paste a link to a successful run of the Extra Tests.

@GregoryTravis GregoryTravis marked this pull request as ready for review February 17, 2025 20:17
@@ -1089,12 +1091,78 @@ add_data_link_specs suite_builder =
Audit_Spec.add_specs suite_builder prefix data_link_file.get database_pending=pending
Save_Connection_Data_Link.add_specs suite_builder prefix connection_details pending

add_generic_jdbc_specs suite_builder =
Copy link
Member

Choose a reason for hiding this comment

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

I think the Postgres_Spec is so large, maybe we should split it overall.

But I guess first step could be to have this generic tests for postgres in a separate file? What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done -- I put them both in a JDBC/ subdir.

Comment on lines +119 to +120
r.at 0 . to_vector . should_equal [10, 20]
r.at 1 . to_vector . should_equal ['asdf', 'zxcv']
Copy link
Member

Choose a reason for hiding this comment

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

Why are we not checking the column names anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some backends are case-sensitive so there's no column name that will work across the three backends we're testing; I make sure to have name-based access in the backend-specific tests.

@GregoryTravis GregoryTravis added CI: Ready to merge This PR is eligible for automatic merge CI: Clean build required CI runners will be cleaned before and after this PR is built. labels Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Clean build required CI runners will be cleaned before and after this PR is built. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants