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 new Maven profile postgres-docker #111

Closed
wants to merge 1 commit into from

Conversation

seelmann
Copy link
Member

  • Useful to run integration tests without installed Postgres DB
  • Activation with -DcayenneTestConnection=postgres-docker
  • Starts Postgres Docker container before integration test and stops if afterwards
  • Sets JDBC connection properties based on dynamic Docker container port allocation

* Useful to run integration tests without installed Postgres DB
* Activation with `-DcayenneTestConnection=postgres-docker`
* Starts Postgres Docker container before integration test and stops if afterwards
* Sets JDBC connection properties based on dynamic Docker container port allocation
@andrus
Copy link
Contributor

andrus commented Sep 13, 2016

Nice! Wondering why do we need this profile declaration in submodules (cayenne-server, cayenne-client). Regular postgres profile is only declared at the top level. This seems to be sufficient.

@seelmann
Copy link
Member Author

Yes, it works when putting the "executions" to the parent pom. However then the Postgres Docker container would be started and stopped for each submodule, even for those that don't have any integration tests and don't need a running database. This would slow down the build by 2-5 seconds per module. As the two submodules run tests against a database I choosed that approach. But feel free to change.

PS: The pull request is result of discussion here: https://lists.apache.org/thread.html/206a60fb8697c2bc1b7c9c44f62f9eb6a7500bb9a6b57b3bd70ebaac@%3Cbuilds.apache.org%3E

@andrus
Copy link
Contributor

andrus commented Sep 14, 2016

Ah, good point. Our current Docker-free profiles don't need to start anything. So they are simpler.

@thinline72
Copy link
Member

Unfortunately, there is a problem to use it on mac fabric8io/docker-maven-plugin#430

Anyway, I'll check it on Linux soon and I'll add configurations for other databases.

Thanks!

@thinline72
Copy link
Member

Hi @seelmann,
Thanks a lot for your pull-request!

I already merged it by 23eb17e, but I did something wrong and pull-request wasn't closed automatically. Sorry about that.

Could you close this PR, please?

@seelmann
Copy link
Member Author

seelmann commented Nov 1, 2016

@thinline72, sure, closed.

@seelmann seelmann closed this Nov 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants