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

Run jpa-mapping-xml tests in native mode on CI #18417

Merged
merged 1 commit into from
Jul 13, 2021

Conversation

yrodiere
Copy link
Member

@yrodiere yrodiere commented Jul 5, 2021

One of the reasons for having dedicated integration test modules for JPA XML mapping was to check that it runs fine in native mode. I ran the tests locally, and they passed locally before I submitted the PR, but I think CI does not run these tests in native mode.

The culprit: I forgot that modules needed to be added to native-tests.json in order for CI to run them in native mode.

@quarkus-bot quarkus-bot bot added the area/infra-automation anything related to CI, bots, etc. that are used to automated our infrastructure label Jul 5, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Jul 5, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 0675d04

Status Name Step Test failures Logs Raw logs
✔️ JVM Tests - JDK 11
JVM Tests - JDK 16 Build Test failures Logs Raw logs
Maven Tests - JDK 11 Build Test failures Logs Raw logs
Native Tests - Data2 Build Test failures Logs Raw logs
Native Tests - Data3 Build ⚠️ Check → Logs Raw logs
Native Tests - Security3 Build Test failures Logs Raw logs

Full information is available in the Build summary check run.

Test Failures

⚙️ JVM Tests - JDK 16 #

📦 extensions/vertx-http/deployment

io.quarkus.vertx.http.testrunner.TestChangeTrackingWhenStartFailsTestCase.testChangeTrackingOnStartupFailure line 82 - More details - Source on GitHub


⚙️ Maven Tests - JDK 11 #

📦 integration-tests/maven

io.quarkus.maven.it.DevMojoIT.testThatNewResourcesAreServed line 849 - More details - Source on GitHub


⚙️ Native Tests - Data2 #

📦 integration-tests/jpa-mapping-xml/modern-app

io.quarkus.it.jpa.mapping.xml.modern.app.ModernAppInGraalITCase.libraryAEntitiesAreMapped - More details - Source on GitHub


⚙️ Native Tests - Security3 #

📦 integration-tests/vault-agroal

io.quarkus.vault.AgroalVaultITCase. - More details - Source on GitHub

io.quarkus.vault.AgroalVaultKv1ITCase. - More details - Source on GitHub

io.quarkus.vault.VaultKv1ITCase. - More details - Source on GitHub

@yrodiere
Copy link
Member Author

yrodiere commented Jul 7, 2021

So the error is this:

	[error]: Build step io.quarkus.hibernate.orm.deployment.HibernateOrmProcessor#defineJpaEntities threw an exception: java.lang.IllegalStateException: Persistence unit 'xmlMappingOnly' references mapping file 'xml-mapping-only.orm.xml', but multiple resources with this path exist in the classpath, and it is not possible to resolve the ambiguity. URLs of matching resources found in the classpath: [file:/home/runner/work/quarkus/quarkus/integration-tests/jpa-mapping-xml/modern-app/target/classes/xml-mapping-only.orm.xml, jar:file:/home/runner/work/quarkus/quarkus/integration-tests/jpa-mapping-xml/modern-app/target/quarkus-integration-test-jpa-mapping-xml-modern-app-999-SNAPSHOT.jar!/xml-mapping-only.orm.xml]

It seems caused by the classloader containing the same resource twice, once through the JAR and once through the target/classes directory... so it's really a problem in how we build our classloaders for tests.

I'll create a reproducer and ask for help from people who actually understand how classloaders are built :)

@yrodiere
Copy link
Member Author

yrodiere commented Jul 7, 2021

Created #18484 to discuss the problem.

@quarkus-bot quarkus-bot bot added the area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins label Jul 9, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Jul 9, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building bbb4bd9

Status Name Step Test failures Logs Raw logs
Native Tests - Misc2 Build ⚠️ Check → Logs Raw logs

@quarkus-bot
Copy link

quarkus-bot bot commented Jul 9, 2021

Failing Jobs - Building 0bc80f7

Status Name Step Test failures Logs Raw logs
MicroProfile TCKs Tests Verify ⚠️ Check → Logs Raw logs
Native Tests - Spring Build ⚠️ Check → Logs Raw logs

@yrodiere
Copy link
Member Author

Looks like the only failing tests are unrelated. Can we merge this, please?

@yrodiere yrodiere added the triage/needs-review Issue that needs a review - remove label if all is clear label Jul 13, 2021
@gsmet gsmet merged commit 7292d44 into quarkusio:main Jul 13, 2021
@quarkus-bot quarkus-bot bot added this to the 2.1 - main milestone Jul 13, 2021
@yrodiere yrodiere deleted the jpa-xmlmapping-native branch August 4, 2021 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/infra-automation anything related to CI, bots, etc. that are used to automated our infrastructure triage/needs-review Issue that needs a review - remove label if all is clear
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants