Coder Social home page Coder Social logo

eventuate-tram-examples-quarkus-customers-and-orders's People

Contributors

cer avatar dartartem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

eventuate-tram-examples-quarkus-customers-and-orders's Issues

Gradle doesn't execute processResources task when EVENTUATEDATABASE changes value

see: https://app.circleci.com/pipelines/github/eventuate-examples/eventuate-tram-examples-quarkus-customers-and-orders/5/workflows/ce85b376-9b21-43bd-b61d-0fc08077d2e7/jobs/14

From logs

2021-01-22 16:04:49,012 WARN  [org.hib.eng.jdb.spi.SqlExceptionHelper] (main) SQL Error: 0, SQLState: null
  2021-01-22 16:04:49,013 ERROR [org.hib.eng.jdb.spi.SqlExceptionHelper] (main) Driver does not support the provided URL: jdbc:postgresql://postgres/eventuate
  2021-01-22 16:04:49,028 ERROR [io.qua.run.Application] (main) Failed to start application (with profile postgresql): java.sql.SQLException: Driver does not support the provided URL: jdbc:postgresql://postgres/eventuate
  at io.agroal.pool.ConnectionFactory.connectionSetup(ConnectionFactory.java:215)

Appears if use wrong db-kind, for example:

quarkus.datasource.username=eventuate
quarkus.datasource.password=eventuate
quarkus.datasource.jdbc.url=jdbc:postgresql://localhost/eventuate
quarkus.datasource.db-kind=postgresql

This is proper configuration for postgres. If change db-kind from postgresql to mysql error that described above will appear at application run.

How to reproduce:

  1. run ./gradlew testClasses
  2. run ./buld-and-test-all-postgres-wal.sh

Reason

./gradlew testClasses processes resources, so db-kind is defaulted to mysql.

from gradle logs (./gradlew -i testResources (clean)):

> Task :customer-service:processResources
Caching disabled for task ':customer-service:processResources' because:
  Build cache is disabled
Task ':customer-service:processResources' is not up-to-date because:
  Output property 'destinationDir' file <myProjectDir>/eventuate-tram-examples-quarkus-customers-and-orders/customer-service/build/resources/main has been removed.
  Output property 'destinationDir' file <myProjectDir>/eventuate-tram-examples-quarkus-customers-and-orders/customer-service/build/resources/main/application.properties has been removed.
:customer-service:processResources (Thread[Execution worker for ':',5,main]) completed. Took 0.001 secs.
:customer-service:classes (Thread[Execution worker for ':',5,main]) started.

and for ./gradlew -i -x :end-to-end-tests:test build (after testResources):

> Task :customer-service:processResources UP-TO-DATE
Caching disabled for task ':customer-service:processResources' because:
  Build cache is disabled
Skipping task ':customer-service:processResources' as it is up-to-date.
:customer-service:processResources (Thread[Execution worker for ':',5,main]) completed. Took 0.0 secs.
:customer-service:classes (Thread[Execution worker for ':',5,main]) started.

So, if run ./gradlew testResources and build application using ./gradlew -x :end-to-end-tests:test build,
resources will be processed only once, because between those commands nothing is changed and they are up to date.
And because db-kind is resolved on step 2:

https://github.com/eventuate-examples/eventuate-tram-examples-quarkus-customers-and-orders/blob/master/build-and-test-all-postgres-wal.sh#L7

https://github.com/eventuate-examples/eventuate-tram-examples-quarkus-customers-and-orders/blob/master/_build-and-test-all.sh#L9

db-kind will be mysql for all test scripts.

Solution

use ./gradlew testClasses -x processResources instead of ./gradlew testClasses

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.