jklingsporn / vertx-jooq

A jOOQ-CodeGenerator to create vertx-ified DAOs and POJOs.
MIT License
382 stars 53 forks source link

Add rxjava3 maven module variation #191

Closed Jotschi closed 2 years ago

Jotschi commented 2 years ago

I needed RxJava3 support. I decided to add it as an extra variation so that user can still choose between the variations. I have also bumped the referenced Vert.x version to 4.2.1

The import import org.jooq.Record; was needed to solve a nameclash with java.lang.Record.

Tests were failing for vertx-jooq-generate due to Communications link failure. Is there a special test setup that needs to be prepared?

jklingsporn commented 2 years ago

Thx for the PR. I indeed tackled the Record issue already locally, but unfortunately haven't pushed it yet. I will push it now to a separate branch. Please try to merge it into your PR to avoid conflicts.

Tests were failing for vertx-jooq-generate due to Communications link failure. Is there a special test setup that needs to be prepared?

For the tests you need to setup two docker containers as described here: https://github.com/jklingsporn/vertx-jooq#how-to-run-tests

jklingsporn commented 2 years ago

And here is the branch: https://github.com/jklingsporn/vertx-jooq/tree/release6.4.0

Jotschi commented 2 years ago

Thanks I'll take a look and rebase the branch.

Jotschi commented 2 years ago

10 Tests are failing in the release6.4.0 branch without my changes. The same tests are failing for this PR. I don't think those are related to my changes.

Should I rename the package for the dao classes when using the RX3 variant? See: https://github.com/jklingsporn/vertx-jooq/pull/191/files#diff-556561cb181f656a3f6d4b351ddc65769a539cb987e49707b6af84cacb74195eR485

jklingsporn commented 2 years ago

I quickly checked the errors and there seem to happen some raceconditions between the tests. When I execute the failed test alone, it passes...

Jotschi commented 2 years ago

I see. I assume one testcase does not fully cleanup in the database? Have you looked into TestContainers? Those could be used to provide a DB for the test via a junit classrule. This can create a fresh db container per testclass or per testcase.

jklingsporn commented 2 years ago

https://youtu.be/mozhRTbRayc

I've fixed some stuff here and there and added JDBC-support. I think it works - however the tests give me too many open files. I got a new laptop which is maybe too fast ^^ Once I sorted this out I can go on with the release. One more thing is bothering me though: jOOQ 3.15 added a reference to java.util.concurrent.Flow via the r2dbc dependency and thus requires Java 9. I know we have late 2021 but I'm still hesitating introduce that requirement.