Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

test: simplify TestUtil.openDB, add tests with various assumeMinServerVersion values#3614

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vlsi merged 1 commit intopgjdbc:masterfromvlsi:assume_min_version
May 3, 2025

Conversation

vlsi
Copy link
Member

@vlsivlsi commentedMay 1, 2025
edited
Loading

Previously, the code considered only a few of PGProperty names when creating a database connection. So there was no possibility to set the rest of the properties by passing them with build.properties or -D...

After the change, the code uses all the matching properties from System.properties, so we can increase test coverage.

For instance, the change adds tests with assumeMinServerVersion setting.

I still do not like howProperties contents is copied all over the place, however, we can't do better as we do not haveProperties(List<Properties>) factory yet.

This test would have caught#3508 earlier.

The idea behind the change is:

  • Prefer pgjdbc property names (the ones inPGProperty). For instance, previously,build.properties included a property namedusername which was handled in a special way sincePGProperty.USER has a value ofuser.
    That is the reason I changedserver totest.url.PGHOST which effectively means "use it as a default PGHOST value, and pass it via the URL rather than props object)
  • host/port/database was handled separately when building the URL. Now the logic is that any property can be passed to the URL when building the URL withTestUtil. Thetest.url. prefix allows to configure which properties should be passed with the URL (TestUtil strips the prefix and adds the rest as a query parameter, etc)

@vlsivlsiforce-pushed theassume_min_version branch 14 times, most recently from10096bb to4c3dfa4CompareMay 2, 2025 17:45
…rVersion valuesPreviously, the code considered only a few of PGProperty names when creating a database connection.So there was no possibility to set the rest of the properties by passing them with build.properties or -D...After the change, the code uses all the matching properties from System.properties,so we can increase test coverage.For instance, the change adds tests with assumeMinServerVersion setting.
@vlsivlsiforce-pushed theassume_min_version branch from4c3dfa4 to0884ee3CompareMay 2, 2025 19:12
@vlsivlsi merged commit9fb6cc1 intopgjdbc:masterMay 3, 2025
18 checks passed
@vlsivlsi deleted the assume_min_version branchMay 16, 2025 12:44
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@vlsi

[8]ページ先頭

©2009-2025 Movatter.jp