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

Refactor DbClient integration tests #9104

Merged

Conversation

romain-grecourt
Copy link
Contributor

Description

Refactor DbClient integration tests.

  • Use TestContainers, with oraclelinux based images
  • Add one sub-module per database, add modules for h2, mysql, pgsql, oracle, mongo
  • Add missing bom and all entry for helidon-integrations-db-pgsql

Refactor tests/integration/harness

  • Removed all the suite support (potentially add back later in a different shape)
  • Reworked HelidonProcessRunner into a more general ProcessRunner API

Documentation

None.

- Use TestContainers, with oraclelinux based images
- Add one sub-module per database, add modules for h2, mysql, pgsql, oracle, mongo
- Add missing bom and all entry for helidon-integrations-db-pgsql

Refactor tests/integration/harness
- Removed all the suite support (potentially add back later in a different shape)
- Re-worked HelidonProcessRunner, to mimic TestContainers
@romain-grecourt romain-grecourt added DB client Helidon DB Client testing 4.x Version 4.x labels Aug 5, 2024
@romain-grecourt romain-grecourt added this to the 4.1.0 milestone Aug 5, 2024
@romain-grecourt romain-grecourt self-assigned this Aug 5, 2024
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Aug 5, 2024
@romain-grecourt romain-grecourt merged commit bc1ea3d into helidon-io:main Aug 6, 2024
13 checks passed
@romain-grecourt romain-grecourt deleted the tests-integration-dbclient branch August 6, 2024 01:23
@Tomas-Kraus
Copy link
Member

Tomas-Kraus commented Aug 6, 2024

So first of all this changeset is something we needed since 4.0 was released. So it's great that we finally have it.
I just have a few concerns about it and it's maintenance which is mostly on me:

  1. Do we really want to maintain such a huge amount of files for every single database vendor? I need to add few tests after fixing one issue in DbClient and it's terrible.
    Framework shall reduce coding, not multiple it.

  2. Also running the tests without the suite is terribly slow. Especially with Oracle DB. Is there a way to resurrect at least some of the proposals I made in my own testing framework? It was pure junit based, with suites, SuiteResolver for Config, containers, DbClient. And it was designed to reduce code to be written, with pre-defined container setups for MySQL/Postgress/...
    I still have the whole thing available in my private repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x DB client Helidon DB Client OCA Verified All contributors have signed the Oracle Contributor Agreement. testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants