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

Allow injection of a reactive session not wrapped in a Mutiny/CompletionStage #10433

Merged
merged 1 commit into from
Jul 3, 2020
Merged

Allow injection of a reactive session not wrapped in a Mutiny/CompletionStage #10433

merged 1 commit into from
Jul 3, 2020

Conversation

DavideD
Copy link
Contributor

@DavideD DavideD commented Jul 2, 2020

Fixes #10432

@Sanne
Copy link
Member

Sanne commented Jul 2, 2020

Looks fine, but some CI tests failed on DB2. It seems similar to that same problem I had when testing DB2 locally; I never had time to investigate that but I'd say that a DB2 driver issue shouldn't get in the way to fix the missing CDI factories...

@aguibert could you have a look at the DB2 failure?

@DavideD perhaps change this PR to not run ITs on DB2 ? I think the PR is fine, but we can't have CI broken for all other devs.

@aguibert
Copy link
Member

aguibert commented Jul 2, 2020

@Sanne I looked into the CI failures and the stuff that's failing is the new tests being added in this PR, both for JVM and native image mode (see log snippets below). Also, the new tests are failing for MySQL and DB2, so it's not a problem specific to DB2. I think we should review these changes more before merging.

My current thought is that we have an intermittent timing issue of the tests running too early and perhaps not waiting for the test app to be ready. If something was going wrong with the DB drivers or hibernate reactive, we'd get some useful output from Quarkus, but currently we're just getting a 404.

JVM mode

[ERROR] Tests run: 6, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 8.188 s <<< FAILURE! - in io.quarkus.it.hibernate.reactive.db2.HibernateReactiveDB2AlternativeTest
[ERROR] io.quarkus.it.hibernate.reactive.db2.HibernateReactiveDB2AlternativeTest.reactiveFind  Time elapsed: 1.425 s  <<< FAILURE!
java.lang.AssertionError: 
1 expectation failed.
Response body doesn't match expectation.
Expected: is "{\"id\":5,\"name\":\"Aloi\"}"
  Actual: RESTEASY003210: Could not find resource for full path: http://localhost:8081/alternative-test/reactiveFind

Native mode (DB2 and MySQL are failing)

[ERROR] Tests run: 6, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 11.113 s <<< FAILURE! - in io.quarkus.it.hibernate.reactive.db2.HibernateReactiveDB2AlternativeTest
[ERROR] io.quarkus.it.hibernate.reactive.db2.HibernateReactiveDB2AlternativeTest.reactiveFind  Time elapsed: 1.668 s  <<< FAILURE!
java.lang.AssertionError: 
1 expectation failed.
Response body doesn't match expectation.
Expected: is "{\"id\":5,\"name\":\"Aloi\"}"
  Actual: RESTEASY003210: Could not find resource for full path: http://localhost:8081/alternative-test/reactiveFind

...

[ERROR] Tests run: 6, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 8.665 s <<< FAILURE! - in io.quarkus.it.hibernate.reactive.mysql.HibernateReactiveMySQLAlternativeTest
[ERROR] io.quarkus.it.hibernate.reactive.mysql.HibernateReactiveMySQLAlternativeTest.reactiveFind  Time elapsed: 1.592 s  <<< FAILURE!
java.lang.AssertionError: 
1 expectation failed.
Response body doesn't match expectation.
Expected: is "{\"id\":5,\"name\":\"Aloi\"}"
  Actual: RESTEASY003210: Could not find resource for full path: http://localhost:8081/alternative-test/reactiveFind

@aguibert
Copy link
Member

aguibert commented Jul 2, 2020

Also, ignore the red herring NPE's you see from io.vertx.db2client.impl.drda.DRDAQueryResponse.parseEXCSQLSTTreply(DRDAQueryResponse.java:551). That is a bug that has been fixed in Vertx 3.9 and will be resolved next time we upgrade Vertx, but it's only related to DDL gen and the test will still pass with that NPE.

@Sanne
Copy link
Member

Sanne commented Jul 3, 2020

@gsmet there's no strong need to backport this, I suspect this is just the first of many polishing PRs. But I'll leave that to you.

@gsmet
Copy link
Member

gsmet commented Jul 3, 2020

Well, it doesn't hurt if we can make it work. TBH, the main reason why I marked it is because I would like to integrate the quickstart PR ASAP :).

@DavideD
Copy link
Contributor Author

DavideD commented Jul 3, 2020

GOt it. It's a silly error in the tests. I'm going to fix it

@Sanne
Copy link
Member

Sanne commented Jul 3, 2020

@gsmet ok yes that would be great. The changed syntax looks much better.

@aguibert many thanks, you guessed right: that NPE confused me.

@DavideD
Copy link
Contributor Author

DavideD commented Jul 3, 2020

OK, I think I've now fixed the issues. Let's wait for CI to confirm

@Sanne Sanne added this to the 1.7.0 - master milestone Jul 3, 2020
@Sanne Sanne added area/hibernate-reactive Hibernate Reactive triage/waiting-for-ci Ready to merge when CI successfully finishes labels Jul 3, 2020
@DavideD
Copy link
Contributor Author

DavideD commented Jul 3, 2020

There is an error on the Windows machine but it doesn't seem related to the PR, any idea?

@Sanne
Copy link
Member

Sanne commented Jul 3, 2020

It's definitely not related, I'll merge this.

@Sanne Sanne merged commit 5b5f845 into quarkusio:master Jul 3, 2020
@gsmet gsmet changed the title [#10432] Allow injection of a reactive session not wrapped in a Mutiny/CompletionStage Allow injection of a reactive session not wrapped in a Mutiny/CompletionStage Jul 16, 2020
@gsmet gsmet modified the milestones: 1.7.0 - master, 1.6.1.Final Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hibernate-reactive Hibernate Reactive triage/waiting-for-ci Ready to merge when CI successfully finishes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow injection of Mutiny.Session and Stage.Session when using Hibernate Reactive
4 participants