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

Added orm panache hot reload test #8305

Merged
merged 1 commit into from
Mar 31, 2020

Conversation

FroMage
Copy link
Member

@FroMage FroMage commented Mar 31, 2020

No description provided.

@FroMage FroMage requested review from Sanne and geoand March 31, 2020 12:40
Copy link
Contributor

@geoand geoand left a comment

Choose a reason for hiding this comment

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

LGTM, although I would personally use RESTAssured's capability of extracting pieces from json and asserting them instead of the whole body

Copy link
Member

@Sanne Sanne left a comment

Choose a reason for hiding this comment

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

great, thanks!

@Sanne Sanne added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Mar 31, 2020
@FroMage
Copy link
Member Author

FroMage commented Mar 31, 2020

LGTM, although I would personally use RESTAssured's capability of extracting pieces from json and asserting them instead of the whole body

Bah, I felt like I wanted to test that the output reflected the changes and not necessarily test JSON parsing.

@geoand
Copy link
Contributor

geoand commented Mar 31, 2020

Yeah, I understand :)

@geoand
Copy link
Contributor

geoand commented Mar 31, 2020

Tests seem to have failed

@FroMage
Copy link
Member Author

FroMage commented Mar 31, 2020

Yeah, damnit. The test fails sometimes, apparently due to ORM sometimes not executing the import.sql script :(

@geoand
Copy link
Contributor

geoand commented Mar 31, 2020

If it caught an error, the test has already proven it's worth, although it may have been more that you bargained for :P

@FroMage
Copy link
Member Author

FroMage commented Mar 31, 2020

[INFO] Running io.quarkus.hibernate.orm.panache.test.PanacheHotReloadTestCase
2020-03-31 15:25:27,458 WARN  [io.qua.dep.QuarkusAugmentor] (main) Using Java versions older than 11 to build Quarkus applications is deprecated and will be disallowed in a future release!
Hibernate: 
    
    drop table if exists MyEntity CASCADE 
Hibernate: 
    
    drop sequence if exists hibernate_sequence
Hibernate: create sequence hibernate_sequence start with 1 increment by 1
Hibernate: 
    
    create table MyEntity (
       id bigint not null,
        name varchar(255),
        primary key (id)
    )
Hibernate: 
    INSERT INTO MyEntity(id, name) VALUES(1, 'my name')
2020-03-31 15:25:30,190 INFO  [io.quarkus] (main) Quarkus 999-SNAPSHOT started in 2.826s. Listening on: http://0.0.0.0:8080
2020-03-31 15:25:30,190 INFO  [io.quarkus] (main) Profile dev activated. Live Coding activated.
2020-03-31 15:25:30,190 INFO  [io.quarkus] (main) Installed features: [agroal, cdi, hibernate-orm, hibernate-orm-panache, jdbc-h2, narayana-jta, resteasy, resteasy-jsonb]
Hibernate: 
    select
        myentity0_.id as id1_0_0_,
        myentity0_.name as name2_0_0_ 
    from
        MyEntity myentity0_ 
    where
        myentity0_.id=?
2020-03-31 15:25:31,593 ERROR [org.jbo.res.res.i18n] (executor-thread-1) RESTEASY002010: Failed to execute: javax.ws.rs.WebApplicationException: HTTP 404 Not Found
	at io.quarkus.hibernate.orm.panache.test.MyTestResource.get(MyTestResource.java:21)

@Sanne these logs show that I'm creating the DB fine, and import.sql is actually called and creates my entity, but on the first request when I query it, I don't see the import yet, sometimes.

Can the import.sql stuff be running in a transaction not yet committed by the time I execute my first request? Sounds far-fetched, but that's the most logical explanation, no?

@FroMage
Copy link
Member Author

FroMage commented Mar 31, 2020

@Sanne forget it, it's not that at all.

@FroMage
Copy link
Member Author

FroMage commented Mar 31, 2020

that's the most logical explanation, no?

Famous Last Words™

@FroMage FroMage force-pushed the orm-panache-hot-reload-test branch from 5b2d497 to 50f474b Compare March 31, 2020 13:35
@FroMage
Copy link
Member Author

FroMage commented Mar 31, 2020

Should pass now.

@Sanne
Copy link
Member

Sanne commented Mar 31, 2020

What was it?

@FroMage
Copy link
Member Author

FroMage commented Mar 31, 2020

Don't ask.

@FroMage
Copy link
Member Author

FroMage commented Mar 31, 2020

PBKAC.

@FroMage FroMage merged commit 8f80e90 into quarkusio:master Mar 31, 2020
@FroMage FroMage added this to the 1.4.0 milestone Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/panache triage/waiting-for-ci Ready to merge when CI successfully finishes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants