-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39413 from yrodiere/refresh-hibernate-search-docs
Refresh documentation (and some tests) of the Hibernate Search + ORM extension
- Loading branch information
Showing
17 changed files
with
420 additions
and
281 deletions.
There are no files selected for viewing
444 changes: 269 additions & 175 deletions
444
docs/src/main/asciidoc/hibernate-search-orm-elasticsearch.adoc
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...bernate/search/orm/elasticsearch/test/devui/DevUIActiveFalseAndNamedPuActiveTrueTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package io.quarkus.hibernate.search.orm.elasticsearch.test.devui; | ||
|
||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
import io.quarkus.hibernate.search.orm.elasticsearch.test.devui.namedpu.MyNamedPuIndexedEntity; | ||
import io.quarkus.test.QuarkusDevModeTest; | ||
|
||
public class DevUIActiveFalseAndNamedPuActiveTrueTest extends AbstractDevUITest { | ||
|
||
@RegisterExtension | ||
static final QuarkusDevModeTest test = new QuarkusDevModeTest() | ||
.withApplicationRoot((jar) -> jar | ||
.addAsResource("application-devui-active-false-and-named-pu-active-true.properties", | ||
"application.properties") | ||
.addClasses(MyIndexedEntity.class) | ||
.addClasses(MyNamedPuIndexedEntity.class)); | ||
|
||
public DevUIActiveFalseAndNamedPuActiveTrueTest() { | ||
super("namedpu", MyNamedPuIndexedEntity.class.getName()); | ||
} | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
...t/java/io/quarkus/hibernate/search/orm/elasticsearch/test/devui/DevUIActiveFalseTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package io.quarkus.hibernate.search.orm.elasticsearch.test.devui; | ||
|
||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
import io.quarkus.test.QuarkusDevModeTest; | ||
|
||
public class DevUIActiveFalseTest extends AbstractDevUITest { | ||
|
||
@RegisterExtension | ||
static final QuarkusDevModeTest test = new QuarkusDevModeTest() | ||
.withApplicationRoot( | ||
(jar) -> jar.addAsResource("application-devui-active-false.properties", "application.properties") | ||
.addClasses(MyIndexedEntity.class)); | ||
|
||
public DevUIActiveFalseTest() { | ||
// Hibernate Search is inactive: the dev console should be empty. | ||
super(null, null); | ||
} | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
...rc/test/java/io/quarkus/hibernate/search/orm/elasticsearch/test/devui/DevUISmokeTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package io.quarkus.hibernate.search.orm.elasticsearch.test.devui; | ||
|
||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
import io.quarkus.test.QuarkusDevModeTest; | ||
|
||
public class DevUISmokeTest extends AbstractDevUITest { | ||
|
||
@RegisterExtension | ||
static final QuarkusDevModeTest test = new QuarkusDevModeTest() | ||
.withApplicationRoot( | ||
(jar) -> jar.addAsResource("application-devui.properties", "application.properties") | ||
.addClasses(MyIndexedEntity.class)); | ||
|
||
public DevUISmokeTest() { | ||
super("<default>", MyIndexedEntity.class.getName()); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...o/quarkus/test/devui/MyIndexedEntity.java → ...ticsearch/test/devui/MyIndexedEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...devui/namedpu/MyNamedPuIndexedEntity.java → ...devui/namedpu/MyNamedPuIndexedEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...ent/src/test/resources/application-devui-active-false-and-named-pu-active-true.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# We already start Elasticsearch with Maven | ||
quarkus.devservices.enabled=false | ||
|
||
quarkus.datasource.db-kind=h2 | ||
quarkus.datasource.jdbc.url=jdbc:h2:mem:default;DB_CLOSE_DELAY=-1 | ||
|
||
quarkus.datasource."nameddatasource".db-kind=h2 | ||
quarkus.datasource."nameddatasource".jdbc.url=jdbc:h2:mem:nameddatasource;DB_CLOSE_DELAY=-1 | ||
|
||
quarkus.hibernate-orm.datasource=<default> | ||
quarkus.hibernate-orm.packages=io.quarkus.hibernate.search.orm.elasticsearch.test.devui | ||
quarkus.hibernate-orm.database.generation=drop-and-create | ||
|
||
quarkus.hibernate-orm."namedpu".datasource=nameddatasource | ||
quarkus.hibernate-orm."namedpu".packages=io.quarkus.hibernate.search.orm.elasticsearch.test.devui.namedpu | ||
quarkus.hibernate-orm."namedpu".database.generation=drop-and-create | ||
|
||
# Hibernate Search is inactive for the default PU | ||
quarkus.hibernate-search-orm.active=false | ||
quarkus.hibernate-search-orm.elasticsearch.version=8.12 | ||
quarkus.hibernate-search-orm.elasticsearch.hosts=${elasticsearch.hosts:localhost:9200} | ||
quarkus.hibernate-search-orm.schema-management.strategy=drop-and-create-and-drop | ||
|
||
# ... but it's (implicitly) active for a named PU | ||
quarkus.hibernate-search-orm."namedpu".elasticsearch.version=8.12 | ||
quarkus.hibernate-search-orm."namedpu".elasticsearch.hosts=${elasticsearch.hosts:localhost:9200} | ||
quarkus.hibernate-search-orm."namedpu".schema-management.strategy=drop-and-create-and-drop |
12 changes: 12 additions & 0 deletions
12
...orm-elasticsearch/deployment/src/test/resources/application-devui-active-false.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# We already start Elasticsearch with Maven | ||
quarkus.devservices.enabled=false | ||
|
||
quarkus.datasource.db-kind=h2 | ||
quarkus.datasource.jdbc.url=jdbc:h2:mem:default;DB_CLOSE_DELAY=-1 | ||
|
||
quarkus.hibernate-orm.database.generation=drop-and-create | ||
|
||
quarkus.hibernate-search-orm.active=false | ||
quarkus.hibernate-search-orm.elasticsearch.version=8.12 | ||
quarkus.hibernate-search-orm.elasticsearch.hosts=${elasticsearch.hosts:localhost:9200} | ||
quarkus.hibernate-search-orm.schema-management.strategy=drop-and-create-and-drop |
11 changes: 11 additions & 0 deletions
11
...rnate-search-orm-elasticsearch/deployment/src/test/resources/application-devui.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# We already start Elasticsearch with Maven | ||
quarkus.devservices.enabled=false | ||
|
||
quarkus.datasource.db-kind=h2 | ||
quarkus.datasource.jdbc.url=jdbc:h2:mem:default;DB_CLOSE_DELAY=-1 | ||
|
||
quarkus.hibernate-orm.database.generation=drop-and-create | ||
|
||
quarkus.hibernate-search-orm.elasticsearch.version=8.12 | ||
quarkus.hibernate-search-orm.elasticsearch.hosts=${elasticsearch.hosts:localhost:9200} | ||
quarkus.hibernate-search-orm.schema-management.strategy=drop-and-create-and-drop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 0 additions & 39 deletions
39
...t/java/io/quarkus/test/devui/DevUIHibernateSearchActiveFalseAndNamedPuActiveTrueTest.java
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
...ests/devmode/src/test/java/io/quarkus/test/devui/DevUIHibernateSearchActiveFalseTest.java
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
...tion-tests/devmode/src/test/java/io/quarkus/test/devui/DevUIHibernateSearchSmokeTest.java
This file was deleted.
Oops, something went wrong.