Skip to content

Replace H2 use for testing with PostgreSQL #719

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Akanksha-kedia
Copy link
Contributor

Description

Additional context and related issues

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required, with the following suggested text:

* Fix some things.

@cla-bot cla-bot bot added the cla-signed label Jul 8, 2025
@Akanksha-kedia
Copy link
Contributor Author

@ebyhr

@Akanksha-kedia
Copy link
Contributor Author

Akanksha-kedia commented Jul 9, 2025 via email

@Akanksha-kedia Akanksha-kedia force-pushed the feature/new_pr branch 2 times, most recently from d8bbdb2 to c1469cc Compare July 9, 2025 02:23
@ebyhr
Copy link
Member

ebyhr commented Jul 9, 2025

I ll have to remove that

Why do we need to remove webapp/pnpm-lock.yaml?

@Akanksha-kedia
Copy link
Contributor Author

Akanksha-kedia commented Jul 9, 2025 via email

@Akanksha-kedia
Copy link
Contributor Author

@ebyhr please review

@Akanksha-kedia
Copy link
Contributor Author

@ebyhr have resolved please review.

@Akanksha-kedia
Copy link
Contributor Author

  • Database Configuration Changes:

    • In gateway-ha/config.yaml: Changed database connection parameters to use environment variables with defaults, making the configuration more flexible for different environments.
  • Timestamp Handling Improvements:

    • In ExactMatchSourceSelectorsDao.java: Added a TimestampColumnMapper class to properly handle timestamp formatting.
    • In HaResourceGroupsManager.java: Added automatic timestamp generation for updateTime when it's null or empty.
  • Test Framework Modernization:

    • In TestingJdbcConnectionManager.java: Replaced H2 in-memory database with PostgreSQL using TestContainers.
    • In TestSpecificDbResourceGroupsManager.java: Removed file-based setup and switched to TestContainers.
    • In TestResourceGroupsManager.java: Updated test assertions to use newer Java methods (e.g., getFirst() instead of get(0)), and improved resource group ID lookup.

@Akanksha-kedia
Copy link
Contributor Author

@mosabua please review.

@Akanksha-kedia
Copy link
Contributor Author

@mosabua

@Akanksha-kedia
Copy link
Contributor Author

Please review and help to merge
@ebyhr @mosabua

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants