Skip to content

Commit 96241d5

Browse files
committed
Fix JUnit 4 being skipped in Search test templates
1 parent ad91d13 commit 96241d5

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

search/hibernate-search-7/orm-elasticsearch/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@
104104
<artifactId>junit-jupiter-engine</artifactId>
105105
<scope>test</scope>
106106
</dependency>
107+
<dependency>
108+
<groupId>org.junit.vintage</groupId>
109+
<artifactId>junit-vintage-engine</artifactId>
110+
<scope>test</scope>
111+
</dependency>
107112
<dependency>
108113
<groupId>org.assertj</groupId>
109114
<artifactId>assertj-core</artifactId>

search/hibernate-search-7/orm-elasticsearch/src/test/java/org/hibernate/search/bugs/SearchTestJunit4Base.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ protected final void configure(Configuration configuration) {
2222
protected void configureMore(Configuration configuration) {
2323
}
2424

25-
@AfterClassOnce
26-
public void tearDown() {
25+
@Override
26+
protected void releaseSessionFactory() {
2727
try ( SearchBackendContainer esToClose = this.elasticsearchContainer; ) {
28-
// Nothing to do: we just want resources to get closed.
28+
super.releaseSessionFactory();
2929
}
3030
}
31+
3132
}

search/hibernate-search-7/orm-lucene/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@
9797
<artifactId>junit-jupiter-engine</artifactId>
9898
<scope>test</scope>
9999
</dependency>
100+
<dependency>
101+
<groupId>org.junit.vintage</groupId>
102+
<artifactId>junit-vintage-engine</artifactId>
103+
<scope>test</scope>
104+
</dependency>
100105
<dependency>
101106
<groupId>org.assertj</groupId>
102107
<artifactId>assertj-core</artifactId>

0 commit comments

Comments
 (0)