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

Sql - enable test with different databases #3053 #3066

Merged
merged 1 commit into from Sep 9, 2021

Conversation

JiriOndrusek
Copy link
Contributor

fixes #3053

Adds a possibility to execute tests against different db types. The full list of supported databases follows (supported types are defined via jdbc extensions.)

  • h2
  • postgresql
  • mssql
  • db2
  • mysql
  • mariadb
  • derby
  • oracle

Default behavior is not changed and h2 in dev-service mode is used.

If database can run in dev-service mode, it could be used. If environment variables are set, external db will be used. See more details in README.adoc file.

Test for stored procedure is disabled for different types of db except H2 - this could be fixed in the future.

@JiriOndrusek
Copy link
Contributor Author

It could be possible to execute tests against several db types by default (at least dev-service db types which don't require license). What do you think about it, should it be investigated @ppalaga , @jamesnetherton ?

@jamesnetherton
Copy link
Contributor

It could be possible to execute tests against several db types by default (at least dev-service db types which don't require license). What do you think about it, should it be investigated @ppalaga , @jamesnetherton ?

Probably, because otherwise we have a bunch of profiles that are never tested on CI. So there's a risk they get stale, stop working and nobody notices.

Quarkus has @TestProfile which could perhaps be used for this use case (at the expense of some test execution speed). We don't have to do this for the initial impl, but we should look to clean things up a bit eventually.

@aldettinger
Copy link
Contributor

It could be possible to execute tests against several db types by default (at least dev-service db types which don't require license). What do you think about it, should it be investigated @ppalaga , @jamesnetherton ?

I would say testing against each db types is up to quarkus. I think camel-sql is using jdbc, so nothing special per db types IMHO.

Copy link
Contributor

@ppalaga ppalaga left a comment

Choose a reason for hiding this comment

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

Very nice, @JiriOndrusek! Some nitpicks inline.

@JiriOndrusek
Copy link
Contributor Author

@ppalaga , @aldettinger all requested changes are done.

Copy link
Contributor

@aldettinger aldettinger left a comment

Choose a reason for hiding this comment

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

Looks nicer and I've also seen the stored proc part follow up issue #3080.

Well done for this PR @JiriOndrusek

Copy link
Contributor

@ppalaga ppalaga left a comment

Choose a reason for hiding this comment

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

@JiriOndrusek looks very good, thanks. Could you please file the followup for running all the DB kind tests on the CI?

@JiriOndrusek
Copy link
Contributor Author

Issue #3083 created.

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.

Sql - enable test with different databases
6 participants