-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add ability to clean the DB in DevUI #19312
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's wait for #16764 (comment) to land before doing something with this one.
It will probably require a bit more work to be integrated with @TomasHofman 's work.
== Reset the Database after tests | ||
|
||
You can use the `@io.quarkus.test.ResetDatabase` annotation to reset the database after a test has run. This will drop the database, | ||
and recreate the schema. Quarkus can use Liqibase, FlyWay or Hibernate ORM to reset the schema, depending on what is configured. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and recreate the schema. Quarkus can use Liqibase, FlyWay or Hibernate ORM to reset the schema, depending on what is configured. | |
and recreate the schema. Quarkus can use Liquibase, Flyway or Hibernate ORM to reset the schema, depending on what is configured. |
de748cb
to
26587c0
Compare
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building 26587c0
Full information is available in the Build summary check run. Test Failures⚙️ JVM Tests - JDK 11 #📦 extensions/hibernate-reactive/deployment✖
✖
✖
✖
✖
✖
⚙️ JVM Tests - JDK 16 #📦 extensions/hibernate-reactive/deployment✖
✖
✖
✖
✖
✖
|
@stuartwdouglas this needs a rebase and CI doesn't look happy about it. I think you end up referencing an Agroal class even with Hibernate Reactive: |
4b2ed55
to
a19f9a1
Compare
a19f9a1
to
f955067
Compare
f955067
to
760d6f6
Compare
@gsmet should be all good now. |
760d6f6
to
c8304c9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stuartwdouglas I rebased and pushed a few small changes to improve the UI.
BUT... there is something very weird, I'm trying it with the hibernate-orm-quickstart
and when I do:
- mvn clean quarkus:dev
- then
q
I get:
2021-08-17 16:35:05,135 WARN [io.qua.hib.orm.run.JPAConfig] (Shutdown thread) Unable to close the EntityManagerFactory: io.quarkus.hibernate.orm.runtime.JPAConfig$LazyPersistenceUnit@23937bf7: java.lang.IllegalStateException: EntityManagerFactory is closed
at org.hibernate.internal.SessionFactoryImpl.validateNotClosed(SessionFactoryImpl.java:539)
at org.hibernate.internal.SessionFactoryImpl.getProperties(SessionFactoryImpl.java:533)
at io.quarkus.hibernate.orm.runtime.schema.SchemaManagementIntegrator.defaultName(SchemaManagementIntegrator.java:61)
at io.quarkus.hibernate.orm.runtime.schema.SchemaManagementIntegrator.disintegrate(SchemaManagementIntegrator.java:45)
at org.hibernate.internal.SessionFactoryImpl$1IntegratorObserver.sessionFactoryClosed(SessionFactoryImpl.java:283)
at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryClosed(SessionFactoryObserverChain.java:61)
at org.hibernate.internal.SessionFactoryImpl.close(SessionFactoryImpl.java:846)
at io.quarkus.hibernate.orm.runtime.JPAConfig$LazyPersistenceUnit.close(JPAConfig.java:161)
at io.quarkus.hibernate.orm.runtime.JPAConfig.destroy(JPAConfig.java:120)
at io.quarkus.hibernate.orm.runtime.JPAConfig_Subclass.destroy$$superforward1(JPAConfig_Subclass.zig:282)
at io.quarkus.hibernate.orm.runtime.JPAConfig_Subclass$$function$$5.apply(JPAConfig_Subclass$$function$$5.zig:32)
at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:54)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.proceed(InvocationInterceptor.java:62)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.monitor(InvocationInterceptor.java:51)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor_Bean.intercept(InvocationInterceptor_Bean.zig:521)
at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:41)
at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:41)
at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:32)
at io.quarkus.hibernate.orm.runtime.JPAConfig_Subclass.destroy(JPAConfig_Subclass.zig:711)
at io.quarkus.hibernate.orm.runtime.JPAConfig_Observer_destroy_4d75ae0cbe7e61a766b92c59cd8bbdeb2c1debf7.notify(JPAConfig_Observer_destroy_4d75ae0cbe7e61a766b92c59cd8bbdeb2c1debf7.zig:189)
at io.quarkus.arc.impl.EventImpl$Notifier.notifyObservers(EventImpl.java:307)
at io.quarkus.arc.impl.EventImpl$Notifier.notify(EventImpl.java:295)
at io.quarkus.arc.impl.EventImpl$Notifier.notify(EventImpl.java:237)
at io.quarkus.arc.impl.ArcContainerImpl.shutdown(ArcContainerImpl.java:359)
at io.quarkus.arc.Arc.shutdown(Arc.java:49)
at io.quarkus.arc.runtime.ArcRecorder$1.run(ArcRecorder.java:44)
at io.quarkus.runtime.StartupContext.runAllInReverseOrder(StartupContext.java:83)
at io.quarkus.runtime.StartupContext.close(StartupContext.java:72)
at io.quarkus.runner.ApplicationImpl.doStop(ApplicationImpl.zig:924)
at io.quarkus.runtime.Application.stop(Application.java:203)
at io.quarkus.runtime.Application.stop(Application.java:155)
at io.quarkus.runtime.ApplicationLifecycleManager$ShutdownHookThread.run(ApplicationLifecycleManager.java:401)
I tried to reproduce it with latest main
and latest main
do not seem to have the same issue (I tried 3 times each and I get the error every time with your branch and never with main
).
No idea how your code could trigger this though...
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building c8304c9
Full information is available in the Build summary check run. Test Failures⚙️ JVM Tests - JDK 11 #📦 extensions/hibernate-orm/deployment✖
⚙️ JVM Tests - JDK 11 Windows #📦 extensions/hibernate-orm/deployment✖
⚙️ JVM Tests - JDK 16 #📦 extensions/hibernate-orm/deployment✖
|
c8304c9
to
722fee8
Compare
722fee8
to
9041867
Compare
@gsmet looks like something I added for HR caused issues with blocking hibernate. Should be fixed now. |
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building 9041867
Full information is available in the Build summary check run. Test Failures⚙️ Gradle Tests - JDK 11 Windows #📦 integration-tests/gradle✖
✖
|
@gsmet I think I accidentally pushed this over your changes |
Never mind, I realized I could manually fetch the commit and apply it from the history on this page. |
OK, cool, let me retest this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now!
Fixes #583
Fixes #19303