# Writing Tests that Exercise Hibernate Search

**URL:** <https://discourse.hibernate.org/t/writing-tests-that-exercise-hibernate-search/6933>\
**Category:** Hibernate Search\
**Created:** [November 18, 2022, 5:42pm UTC](https://discourse.hibernate.org/t/writing-tests-that-exercise-hibernate-search/6933 "2022-11-18T17:42:15Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![rob](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@rob](https://discourse.hibernate.org/u/rob)\
**Post date:** [November 22, 2022, 3:25am UTC](https://discourse.hibernate.org/t/writing-tests-that-exercise-hibernate-search/6933/5 "2022-11-22T03:25:19Z")

</div>

Good news: I got this to work. Combination of doing doInTransaction and I had been using @DataJpaTest changed to @SpringbootTest at the end and bingo.

Also, on my other ticket, I did get that sorted: indexing subs but fetching abstract base types. So pretty happy. Thanks for the help.

---

_[View the full topic](https://discourse.hibernate.org/t/writing-tests-that-exercise-hibernate-search/6933)._
