Skip to content

Commit

Permalink
Upgrade to Elasticsearch 8 in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yrodiere authored and gsmet committed Jul 24, 2023
1 parent ef3cf51 commit 5ea74e6
Show file tree
Hide file tree
Showing 16 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<volume.access.modifier>:Z</volume.access.modifier>

<!-- Defaults for integration tests -->
<elasticsearch-server.version>7.16.3</elasticsearch-server.version>
<elasticsearch-server.version>8.8.2</elasticsearch-server.version>
<elasticsearch.image>docker.io/elastic/elasticsearch:${elasticsearch-server.version}</elasticsearch.image>
<logstash.image>docker.io/elastic/logstash:${elasticsearch-server.version}</logstash.image>
<kibana.image>docker.io/elastic/kibana:${elasticsearch-server.version}</kibana.image>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ quarkus.datasource.db-kind=postgresql <2>
quarkus.hibernate-orm.sql-load-script=import.sql <3>
quarkus.hibernate-search-orm.elasticsearch.version=7 <4>
quarkus.hibernate-search-orm.elasticsearch.version=8 <4>
quarkus.hibernate-search-orm.indexing.plan.synchronization.strategy=sync <5>
%prod.quarkus.datasource.jdbc.url=jdbc:postgresql://localhost/quarkus_test <6>
Expand Down Expand Up @@ -724,7 +724,7 @@ quarkus.datasource.db-kind=h2
quarkus.datasource.jdbc.url=jdbc:h2:mem:default;DB_CLOSE_DELAY=-1
quarkus.hibernate-search-orm.elasticsearch.hosts=es1.mycompany.com:9200
quarkus.hibernate-search-orm.elasticsearch.version=7
quarkus.hibernate-search-orm.elasticsearch.version=8
----

Using a map based approach, it is also possible to configure named persistence units:
Expand All @@ -744,10 +744,10 @@ quarkus.hibernate-orm."inventory".datasource=inventory <4>
quarkus.hibernate-orm."inventory".packages=org.acme.model.inventory
quarkus.hibernate-search-orm."users".elasticsearch.hosts=es1.mycompany.com:9200 <5>
quarkus.hibernate-search-orm."users".elasticsearch.version=7
quarkus.hibernate-search-orm."users".elasticsearch.version=8
quarkus.hibernate-search-orm."inventory".elasticsearch.hosts=es2.mycompany.com:9200 <6>
quarkus.hibernate-search-orm."inventory".elasticsearch.version=7
quarkus.hibernate-search-orm."inventory".elasticsearch.version=8
----
<1> Define a datasource named `users`.

Check warning on line 752 in docs/src/main/asciidoc/hibernate-search-orm-elasticsearch.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Spelling] Use correct American English spelling. Did you really mean 'datasource'? Raw Output: {"message": "[Quarkus.Spelling] Use correct American English spelling. Did you really mean 'datasource'?", "location": {"path": "docs/src/main/asciidoc/hibernate-search-orm-elasticsearch.adoc", "range": {"start": {"line": 752, "column": 3}}}, "severity": "WARNING"}
<2> Define a datasource named `inventory`.

Check warning on line 753 in docs/src/main/asciidoc/hibernate-search-orm-elasticsearch.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Spelling] Use correct American English spelling. Did you really mean 'datasource'? Raw Output: {"message": "[Quarkus.Spelling] Use correct American English spelling. Did you really mean 'datasource'?", "location": {"path": "docs/src/main/asciidoc/hibernate-search-orm-elasticsearch.adoc", "range": {"start": {"line": 753, "column": 3}}}, "severity": "WARNING"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ quarkus.datasource.data1.jdbc.url=jdbc:h2:mem:data1;DB_CLOSE_DELAY=-1
quarkus.hibernate-orm.database.generation=drop-and-create
quarkus.hibernate-orm.datasource=<default>

quarkus.hibernate-search-orm.elasticsearch.version=7
quarkus.hibernate-search-orm.elasticsearch.version=8
quarkus.hibernate-search-orm.elasticsearch.hosts=${elasticsearch.hosts:localhost:9200}
quarkus.hibernate-search-orm.elasticsearch.protocol=${elasticsearch.protocol:http}
quarkus.hibernate-search-orm.schema-management.strategy=drop-and-create-and-drop
Expand All @@ -16,7 +16,7 @@ quarkus.hibernate-search-orm.coordination.strategy=outbox-polling
quarkus.hibernate-orm."pu1".database.generation=drop-and-create
quarkus.hibernate-orm."pu1".datasource=data1

quarkus.hibernate-search-orm."pu1".elasticsearch.version=7
quarkus.hibernate-search-orm."pu1".elasticsearch.version=8
quarkus.hibernate-search-orm."pu1".elasticsearch.hosts=${elasticsearch.hosts:localhost:9200}
quarkus.hibernate-search-orm."pu1".elasticsearch.protocol=${elasticsearch.protocol:http}
quarkus.hibernate-search-orm."pu1".schema-management.strategy=drop-and-create-and-drop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ 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=7
quarkus.hibernate-search-orm.elasticsearch.version=8
quarkus.hibernate-search-orm.elasticsearch.hosts=${elasticsearch.hosts:localhost:9200}
quarkus.hibernate-search-orm.elasticsearch.protocol=${elasticsearch.protocol:http}
quarkus.hibernate-search-orm.schema-management.strategy=drop-and-create-and-drop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ quarkus.datasource.data3.jdbc.url=jdbc:h2:mem:data3;DB_CLOSE_DELAY=-1
quarkus.hibernate-orm.datasource=<default>
quarkus.hibernate-orm.database.generation=drop-and-create

quarkus.hibernate-search-orm.elasticsearch.version=7
quarkus.hibernate-search-orm.elasticsearch.version=8
quarkus.hibernate-search-orm.elasticsearch.hosts=${elasticsearch.hosts:localhost:9200}
quarkus.hibernate-search-orm.elasticsearch.protocol=${elasticsearch.protocol:http}
quarkus.hibernate-search-orm.schema-management.strategy=drop-and-create-and-drop
Expand All @@ -22,7 +22,7 @@ quarkus.hibernate-search-orm.indexing.plan.synchronization.strategy=sync
quarkus.hibernate-orm."pu1".database.generation=drop-and-create
quarkus.hibernate-orm."pu1".datasource=data1

quarkus.hibernate-search-orm."pu1".elasticsearch.version=7
quarkus.hibernate-search-orm."pu1".elasticsearch.version=8
quarkus.hibernate-search-orm."pu1".elasticsearch.hosts=${elasticsearch.hosts:localhost:9200}
quarkus.hibernate-search-orm."pu1".elasticsearch.protocol=${elasticsearch.protocol:http}
quarkus.hibernate-search-orm."pu1".schema-management.strategy=drop-and-create-and-drop
Expand All @@ -31,7 +31,7 @@ quarkus.hibernate-search-orm."pu1".indexing.plan.synchronization.strategy=sync
quarkus.hibernate-orm."pu2".database.generation=drop-and-create
quarkus.hibernate-orm."pu2".datasource=data2

quarkus.hibernate-search-orm."pu2".elasticsearch.version=7
quarkus.hibernate-search-orm."pu2".elasticsearch.version=8
quarkus.hibernate-search-orm."pu2".elasticsearch.hosts=${elasticsearch.hosts:localhost:9200}
quarkus.hibernate-search-orm."pu2".elasticsearch.protocol=${elasticsearch.protocol:http}
quarkus.hibernate-search-orm."pu2".schema-management.strategy=drop-and-create-and-drop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ 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=7.10
quarkus.hibernate-search-orm.elasticsearch.version=8.8
# Simulate an offline Elasticsearch instance by pointing to a non-existing cluster
quarkus.hibernate-search-orm.elasticsearch.hosts=localhost:14800
quarkus.hibernate-search-orm.schema-management.strategy=none
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ 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=7
quarkus.hibernate-search-orm.elasticsearch.version=8
quarkus.hibernate-search-orm.elasticsearch.hosts=${elasticsearch.hosts:localhost:9200}
quarkus.hibernate-search-orm.elasticsearch.protocol=${elasticsearch.protocol:http}
quarkus.hibernate-search-orm.schema-management.strategy=drop-and-create-and-drop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ public class DevConsoleHibernateSearchActiveFalseAndNamedPuActiveTrueTest {
+ "quarkus.hibernate-orm.datasource=<default>\n"
+ "quarkus.hibernate-orm.packages=io.quarkus.test.devconsole\n"
+ "quarkus.hibernate-search-orm.active=false\n"
+ "quarkus.hibernate-search-orm.elasticsearch.version=7.10\n"
+ "quarkus.hibernate-search-orm.elasticsearch.version=8.8\n"
// ... but it's (implicitly) active for a named PU
+ "quarkus.hibernate-orm.\"namedpu\".datasource=nameddatasource\n"
+ "quarkus.hibernate-orm.\"namedpu\".packages=io.quarkus.test.devconsole.namedpu\n"
+ "quarkus.hibernate-search-orm.\"namedpu\".elasticsearch.version=7.10\n"
+ "quarkus.hibernate-search-orm.\"namedpu\".elasticsearch.version=8.8\n"
// Start Hibernate Search offline for the named PU,
// because we don't have dev services except for the default PU
+ "quarkus.hibernate-search-orm.\"namedpu\".schema-management.strategy=none\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class DevConsoleHibernateSearchActiveFalseTest {
+ "quarkus.datasource.jdbc.url=jdbc:h2:mem:test\n"
// Hibernate Search is inactive: the dev console should be empty.
+ "quarkus.hibernate-search-orm.active=false\n"
+ "quarkus.hibernate-search-orm.elasticsearch.version=7.10\n"),
+ "quarkus.hibernate-search-orm.elasticsearch.version=8.8\n"),
"application.properties")
.addClasses(MyIndexedEntity.class));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class DevConsoleHibernateSearchSmokeTest {
.withApplicationRoot((jar) -> jar.addAsResource(
new StringAsset("quarkus.datasource.db-kind=h2\n"
+ "quarkus.datasource.jdbc.url=jdbc:h2:mem:test\n"
+ "quarkus.hibernate-search-orm.elasticsearch.version=7.10\n"
+ "quarkus.hibernate-search-orm.elasticsearch.version=8.8\n"
// Start offline, we don't have an Elasticsearch cluster here
+ "quarkus.hibernate-search-orm.schema-management.strategy=none\n"
+ "quarkus.hibernate-search-orm.elasticsearch.version-check.enabled=false\n"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ public class DevUIHibernateSearchActiveFalseAndNamedPuActiveTrueTest extends Abs
+ "quarkus.hibernate-orm.datasource=<default>\n"
+ "quarkus.hibernate-orm.packages=io.quarkus.test.devui\n"
+ "quarkus.hibernate-search-orm.active=false\n"
+ "quarkus.hibernate-search-orm.elasticsearch.version=7.10\n"
+ "quarkus.hibernate-search-orm.elasticsearch.version=8.8\n"
// ... but it's (implicitly) active for a named PU
+ "quarkus.hibernate-orm.\"namedpu\".datasource=nameddatasource\n"
+ "quarkus.hibernate-orm.\"namedpu\".packages=io.quarkus.test.devui.namedpu\n"
+ "quarkus.hibernate-search-orm.\"namedpu\".elasticsearch.version=7.10\n"
+ "quarkus.hibernate-search-orm.\"namedpu\".elasticsearch.version=8.8\n"
// Start Hibernate Search offline for the named PU,
// because we don't have dev services except for the default PU
+ "quarkus.hibernate-search-orm.\"namedpu\".schema-management.strategy=none\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class DevUIHibernateSearchActiveFalseTest extends AbstractDevUIHibernateS
+ "quarkus.datasource.jdbc.url=jdbc:h2:mem:test\n"
// Hibernate Search is inactive: the dev console should be empty.
+ "quarkus.hibernate-search-orm.active=false\n"
+ "quarkus.hibernate-search-orm.elasticsearch.version=7.10\n"),
+ "quarkus.hibernate-search-orm.elasticsearch.version=8.8\n"),
"application.properties")
.addClasses(MyIndexedEntity.class));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class DevUIHibernateSearchSmokeTest extends AbstractDevUIHibernateSearchT
.withApplicationRoot((jar) -> jar.addAsResource(
new StringAsset("quarkus.datasource.db-kind=h2\n"
+ "quarkus.datasource.jdbc.url=jdbc:h2:mem:test\n"
+ "quarkus.hibernate-search-orm.elasticsearch.version=7.10\n"
+ "quarkus.hibernate-search-orm.elasticsearch.version=8.8\n"
// Start offline, we don't have an Elasticsearch cluster here
+ "quarkus.hibernate-search-orm.schema-management.strategy=none\n"
+ "quarkus.hibernate-search-orm.elasticsearch.version-check.enabled=false\n"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ quarkus.datasource.jdbc.max-size=8

quarkus.hibernate-orm.database.generation=drop-and-create

quarkus.hibernate-search-orm.elasticsearch.version=7
quarkus.hibernate-search-orm.elasticsearch.version=8
quarkus.hibernate-search-orm.elasticsearch.hosts=${elasticsearch.hosts:localhost:9200}
quarkus.hibernate-search-orm.elasticsearch.protocol=${elasticsearch.protocol:http}
quarkus.hibernate-search-orm.schema-management.strategy=drop-and-create-and-drop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ quarkus.flyway.clean-at-start=true
quarkus.hibernate-orm.database.generation=none
quarkus.hibernate-orm.multitenant=schema

quarkus.hibernate-search-orm.elasticsearch.version=7
quarkus.hibernate-search-orm.elasticsearch.version=8
quarkus.hibernate-search-orm.elasticsearch.hosts=${elasticsearch.hosts:localhost:9200}
quarkus.hibernate-search-orm.elasticsearch.protocol=${elasticsearch.protocol:http}
quarkus.hibernate-search-orm.schema-management.strategy=drop-and-create-and-drop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ quarkus.datasource.jdbc.max-size=8

quarkus.hibernate-orm.database.generation=drop-and-create

quarkus.hibernate-search-orm.elasticsearch.version=7
quarkus.hibernate-search-orm.elasticsearch.version=8
quarkus.hibernate-search-orm.elasticsearch.analysis.configurer=bean:backend-analysis
quarkus.hibernate-search-orm.elasticsearch.indexes.Analysis1TestingEntity.analysis.configurer=class:io.quarkus.it.hibernate.search.orm.elasticsearch.analysis.IndexAnalysis1Configurer
quarkus.hibernate-search-orm.elasticsearch.indexes.Analysis2TestingEntity.analysis.configurer=bean:index-analysis-2
Expand Down

0 comments on commit 5ea74e6

Please sign in to comment.