Skip to content

Conversation

IvanPetkov23
Copy link
Contributor

Added tests for Hibernate Reactive with Oracle. Fixes: #23820

@quarkus-bot quarkus-bot bot added the area/hibernate-reactive Hibernate Reactive label Feb 6, 2025
@IvanPetkov23 IvanPetkov23 changed the title Integration tests/hibernate reactive oracle Integration tests for hibernate-reactive-oracle Feb 6, 2025
Copy link
Member

@yrodiere yrodiere left a comment

Choose a reason for hiding this comment

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

Thanks! Looking great, I just have a few comments. The main one being about CI and native tests.

This comment has been minimized.

Copy link
Member

@yrodiere yrodiere left a comment

Choose a reason for hiding this comment

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

Some comments to make the build pass on Windows -- which doesn't have containers and thus cannot handle DB tests.
Essentially these tests need to be disabled by default, like in every other module, and enabled when passing -Dtest-containers to Maven.

@quarkus-bot quarkus-bot bot added the area/infra-automation anything related to CI, bots, etc. that are used to automated our infrastructure label Feb 10, 2025

This comment has been minimized.

@IvanPetkov23
Copy link
Contributor Author

I am sorry about the merge commits in the PR, but I am new to open source, so I am still learning :)

@yrodiere
Copy link
Member

I am sorry about the merge commits in the PR, but I am new to open source, so I am still learning :)

No problem. You may want to learn about rebasing: https://docs.github.com/en/get-started/using-git/about-git-rebase

If you rebase your branch on main, you should be able to get rid of merge commits. Typically I use git rebase -i main, but I'd recommend you read the GitHub docs by following the link above :)

@IvanPetkov23 IvanPetkov23 marked this pull request as draft February 12, 2025 17:01
@IvanPetkov23
Copy link
Contributor Author

It is getting worse, so I converted the PR to draft :)

@yrodiere
Copy link
Member

Do you need me to do the rebase, or are you still trying? :)

@IvanPetkov23
Copy link
Contributor Author

I am still trying, but without success. If you can do it for me, that would be great! :)

@yrodiere
Copy link
Member

On it

@yrodiere yrodiere force-pushed the integration-tests/hibernate-reactive-oracle branch from 2caa357 to 3dc8fc8 Compare February 13, 2025 09:08
@yrodiere
Copy link
Member

Alright, I force-pushed a rebase.

I must admit you got yourself in quite a situation 😅 Better avoid merge commits from the start, next time :) You can instruct git to rebase by default when pulling, instead of merging: https://coderwall.com/p/tnoiug/rebase-by-default-when-doing-git-pull

FWIW, here's what I did:

git switch main
git pull
git switch <your branch>
git rebase -i main

I used "s" for every commit to squash everything:

image

Got a conflict:

Auto-merging .github/native-tests.json
CONFLICT (content): Merge conflict in .github/native-tests.json
error: could not apply 43df92f39ea... Fix git issues
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Recorded preimage for '.github/native-tests.json'
Could not apply 43df92f39ea... Fix git issues

Solved it manually in my IDE, then:

git add -A
git rebase --continue

Got another conflict:

Auto-merging integration-tests/hibernate-reactive-oracle/pom.xml
CONFLICT (add/add): Merge conflict in integration-tests/hibernate-reactive-oracle/pom.xml
error: could not apply 4a8813cfe65... Updated native-tests.json to support hibernate-reactive-oracle module. Refactored pom.xml to pass build on windows.
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Recorded preimage for 'integration-tests/hibernate-reactive-oracle/pom.xml'
Could not apply 4a8813cfe65... Updated native-tests.json to support hibernate-reactive-oracle module. Refactored pom.xml to pass build on windows.

Solved it manually in my IDE, then:

git add -A
git rebase --continue

Got another conflict:

CONFLICT (content): Merge conflict in .github/native-tests.json
Auto-merging integration-tests/hibernate-reactive-oracle/pom.xml
CONFLICT (content): Merge conflict in integration-tests/hibernate-reactive-oracle/pom.xml
error: could not apply b702df5da95... Updated native-tests.json to support hibernate-reactive-oracle module. Refactored pom.xml to pass build on windows.
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Recorded preimage for '.github/native-tests.json'
Recorded preimage for 'integration-tests/hibernate-reactive-oracle/pom.xml'
Could not apply b702df5da95... Updated native-tests.json to support hibernate-reactive-oracle module. Refactored pom.xml to pass build on windows.

Solved it manually in my IDE, then:

git add -A
git rebase --continue

Then rebase ended successfully, so I force-pushed to rewrite the git history of this branch (don't do this anywhere, but for PRs with a messy history, it's reasonable):

git push --force

@yrodiere yrodiere marked this pull request as ready for review February 13, 2025 09:10

This comment has been minimized.

@yrodiere yrodiere added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Feb 13, 2025

This comment has been minimized.


# Reactive config
quarkus.datasource.reactive=true
quarkus.datasource.reactive.url=${oracle.reactive.url}
Copy link
Member

Choose a reason for hiding this comment

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

@IvanPetkov23 I think this should have been updated to reactive-oracle.url to match your other changes.

CI is failing because it wasn't.

@IvanPetkov23
Copy link
Contributor Author

Thanks for the help and the patience :)

This comment has been minimized.

@yrodiere yrodiere force-pushed the integration-tests/hibernate-reactive-oracle branch 2 times, most recently from a3d051d to 7b2a830 Compare February 19, 2025 07:57
Copy link
Member

@yrodiere yrodiere left a comment

Choose a reason for hiding this comment

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

I added a commit to fix the DB setup, because it didn't work. Also rebased on main.

It works locally, let's see how it goes on CI.

This comment has been minimized.

@IvanPetkov23
Copy link
Contributor Author

IvanPetkov23 commented Feb 20, 2025

It is working locally on my machine too. Why CI tests are failing?

@yrodiere
Copy link
Member

yrodiere commented Feb 20, 2025

I believe something leaves the Oracle container running after the new hibernate-reactive-oracle integration tests run, leading to problems when running later integration tests.
I can't investigate now, but will have a look, most likely next week :/

i10320 and others added 2 commits February 27, 2025 09:36
…r ITs

E.g. on quarkus-reactive-oracle-client-deployment,
quarkus-it-jpa-oracle.

Because the current setup doesn't seem to work.
@yrodiere yrodiere force-pushed the integration-tests/hibernate-reactive-oracle branch from 7b2a830 to a6dadc5 Compare February 27, 2025 08:37
Copy link

quarkus-bot bot commented Feb 27, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit a6dadc5.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

⚙️ JVM Tests - JDK 17 Windows

📦 extensions/micrometer-opentelemetry/deployment

io.quarkus.micrometer.opentelemetry.deployment.compatibility.MicrometerTimedInterceptorTest.testTimeMethod_Uni - History

  • Stream has no elements - java.lang.IllegalArgumentException
java.lang.IllegalArgumentException: Stream has no elements
	at io.quarkus.micrometer.opentelemetry.deployment.common.MetricDataFilter.lambda$lastReading$2(MetricDataFilter.java:213)
	at java.base/java.util.Optional.orElseThrow(Optional.java:403)
	at io.quarkus.micrometer.opentelemetry.deployment.common.MetricDataFilter.lastReading(MetricDataFilter.java:213)
	at io.quarkus.micrometer.opentelemetry.deployment.common.MetricDataFilter.lastReadingDataPoint(MetricDataFilter.java:231)
	at io.quarkus.micrometer.opentelemetry.deployment.compatibility.MicrometerTimedInterceptorTest.testTimeMethod_Uni(MicrometerTimedInterceptorTest.java:174)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at io.quarkus.test.QuarkusUnitTest.runExtensionMethod(QuarkusUnitTest.java:521)

@yrodiere
Copy link
Member

Looks like the failures were caused by problems on the main branch; rebasing today fixed them.

We're good to go, I'll merge. Thanks again @IvanPetkov23!

@yrodiere yrodiere merged commit 1c5bee4 into quarkusio:main Feb 27, 2025
58 checks passed
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Feb 27, 2025
@quarkus-bot quarkus-bot bot added this to the 3.21 - main milestone Feb 27, 2025
@quarkus-bot quarkus-bot bot added the kind/enhancement New feature or request label Feb 27, 2025
@IvanPetkov23 IvanPetkov23 deleted the integration-tests/hibernate-reactive-oracle branch February 27, 2025 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hibernate-reactive Hibernate Reactive area/infra-automation anything related to CI, bots, etc. that are used to automated our infrastructure kind/enhancement New feature or request triage/flaky-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create integration tests for Hibernate Reactive and Oracle
2 participants