liveBook · Manning

Quarkus-test-hibernate-reactive-panache

As explained in Quarkus in Action

quarkus-test-hibernate-reactive-panache is a Quarkus test extension that provides helpers for testing Hibernate Reactive Panache code.

quarkus-test-hibernate-reactive-panache is a test-scope Quarkus extension for testing Hibernate Reactive Panache persistence with reactive transactions and Uni-based assertions. section 7.7.2

Use the extension to:

  • Run reactive persistence tests on the Vert.x event-loop thread with @RunOnVertxContext. section 7.7.2
  • Inject TransactionalUniAsserter for assertions whose operations run in separate transactions. section 7.7.2
  • Pass values between asynchronous assertions with putData and getData. section 7.7.2

Testing a persisted reservation

Inject TransactionalUniAsserter, persist a Reservation through a Uni-producing operation, store its generated identifier, then assert the count and retrieve the entity with findById.

How Quarkus in Action covers it

How deep it goes
Explains dependency setup, event-loop execution, transactional assertions, and asynchronous data passing without detailing lower-level extension internals.
Examples
Demonstrates a ReservationPersistenceTest that persists, counts, retrieves, and passes an identifier across asynchronous assertions.
What it assumes
Assumes Hibernate Reactive Panache and Uni-based application code, while introducing the required event-loop and transactional test APIs.
What you can do after
Apply it via TransactionalUniAsserter to test reactive persistence operations and verify their results across transactions.
How it connects
Connects Hibernate Reactive Panache with Vert.x, Uni, transactions, and JUnit assertions.

This explainer was generated by Manning's knowledge graph from the text of Quarkus in Action. The section links point to the parts of the book it draws on.