Skip to content

Commit dd7ba4e

Browse files
Solr 9.7 → 9.8 for integration tests
1 parent 425562b commit dd7ba4e

File tree

14 files changed

+144
-17
lines changed

14 files changed

+144
-17
lines changed

.github/workflows/run-tests.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -51,26 +51,26 @@ jobs:
5151
ref: branch_8_11
5252
path: lucene-solr
5353

54-
- name: Checkout solr 9.7
54+
- name: Checkout solr 9.8
5555
if: matrix.solr == 9
5656
uses: actions/checkout@v4
5757
with:
5858
repository: apache/solr
59-
ref: branch_9_7
59+
ref: branch_9_8
6060
path: lucene-solr
6161

6262
- name: Start Solr ${{ matrix.solr }} in ${{ matrix.mode }} mode
6363
run: |
6464
chmod -R a+w lucene-solr
6565
cd lucene-solr
66-
patch -p1 < ../tests/Integration/Fixtures/solrconf.patch
67-
patch -p1 < ../tests/Integration/Fixtures/schema${{ matrix.solr }}.patch
66+
patch -p1 < ../tests/Integration/Fixtures/conf/solrconf${{ matrix.solr }}.patch
67+
patch -p1 < ../tests/Integration/Fixtures/conf/schema${{ matrix.solr }}.patch
6868
cd solr/server/solr/configsets/sample_techproducts_configs/conf
6969
zip -r techproducts.zip *
7070
cd -
7171
mv solr/server/solr/configsets/sample_techproducts_configs/conf/techproducts.zip ../tests/Integration/Fixtures/
7272
cd ../tests/Integration/Fixtures/docker/solr${{ matrix.solr }}_${{ matrix.mode }}
73-
docker compose up -d
73+
docker compose up
7474
7575
- name: Install dependencies
7676
run: |

tests/Integration/AbstractTechproductsTestCase.php

+31
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,23 @@ public static function setUpBeforeClass(): void
172172
self::$client->update($update);
173173
}
174174

175+
// UTF8TEST was removed for Solr 9.8 in SOLR-17556
176+
if (9 <= self::$solrVersion) {
177+
$update = self::$client->createUpdate();
178+
179+
$utf8test = $update->createDocument();
180+
$utf8test->setField('id', 'UTF8TEST');
181+
$utf8test->setField('manu', 'Apache Software Foundation');
182+
$utf8test->setField('cat', 'software');
183+
$utf8test->setField('cat', 'search');
184+
$utf8test->setField('features', 'êâîôû');
185+
$utf8test->setField('price', 0.0);
186+
$utf8test->setField('inStock', true);
187+
188+
$update->addDocument($utf8test);
189+
self::$client->update($update);
190+
}
191+
175192
$update = self::$client->createUpdate();
176193
$update->addCommit(false, true);
177194
self::$client->update($update);
@@ -4953,6 +4970,13 @@ public function testManagedStopwords()
49534970
*/
49544971
public function testManagedStopwordsCreation(string $name, string $term)
49554972
{
4973+
// this test triggers an error for Solr 9.8 in SolrCloud mode
4974+
if (9 === self::$solrVersion && $this instanceof AbstractCloudTestCase) {
4975+
$this->expectNotToPerformAssertions();
4976+
4977+
return;
4978+
}
4979+
49564980
// don't use invalid filename characters in list name on Windows to avoid running into SOLR-15895
49574981
if (self::$isSolrOnWindows) {
49584982
$name = str_replace([':', '/', '?'], '', $name);
@@ -5118,6 +5142,13 @@ public function testManagedSynonyms()
51185142
*/
51195143
public function testManagedSynonymsCreation(string $name, string $term)
51205144
{
5145+
// this test triggers an error for Solr 9.8 in SolrCloud mode
5146+
if (9 === self::$solrVersion && $this instanceof AbstractCloudTestCase) {
5147+
$this->expectNotToPerformAssertions();
5148+
5149+
return;
5150+
}
5151+
51215152
// don't use invalid filename characters in map name on Windows to avoid running into SOLR-15895
51225153
if (self::$isSolrOnWindows) {
51235154
$name = str_replace([':', '/', '?'], '', $name);

tests/Integration/Fixtures/solrconf.patch tests/Integration/Fixtures/conf/solrconf7.patch

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
diff --git a/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml b/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
2-
index 06ac9b3d2e6..087287d2339 100644
2+
index 1570be4870b..3eab43beead 100644
33
--- a/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
44
+++ b/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
55
@@ -86,6 +86,8 @@
66
<lib dir="${solr.install.dir:../../../..}/contrib/velocity/lib" regex=".*\.jar" />
77
<lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-velocity-\d.*\.jar" />
8-
8+
99
+ <lib dir="${solr.install.dir:../../../..}/dist"/>
1010
+
1111
<!-- an exact 'path' can be used instead of a 'dir' to specify a
1212
specific jar file. This will cause a serious error to be logged
1313
if it can't be loaded.
14-
@@ -1008,6 +1010,39 @@
15-
14+
@@ -991,6 +993,39 @@
15+
1616
-->
17-
17+
1818
+ <!-- A request handler for MLT queries.
1919
+ -->
2020
+ <requestHandler name="/mlt" class="solr.MoreLikeThisHandler" />
@@ -49,5 +49,5 @@ index 06ac9b3d2e6..087287d2339 100644
4949
+ </requestHandler>
5050
+
5151
<!-- Spell Check
52-
52+
5353
The spell check component can return a list of alternative spelling
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
diff --git a/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml b/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
2+
index 360e6dbf8ee..949a0b1c5f8 100644
3+
--- a/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
4+
+++ b/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
5+
@@ -83,6 +83,8 @@
6+
<lib dir="${solr.install.dir:../../../..}/contrib/velocity/lib" regex=".*\.jar" />
7+
<lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-velocity-\d.*\.jar" />
8+
9+
+ <lib dir="${solr.install.dir:../../../..}/dist"/>
10+
+
11+
<!-- an exact 'path' can be used instead of a 'dir' to specify a
12+
specific jar file. This will cause a serious error to be logged
13+
if it can't be loaded.
14+
@@ -1040,6 +1042,39 @@
15+
16+
-->
17+
18+
+ <!-- A request handler for MLT queries.
19+
+ -->
20+
+ <requestHandler name="/mlt" class="solr.MoreLikeThisHandler" />
21+
+
22+
+ <!-- A request handler for Facet, Highlight, and Spellcheck components
23+
+ -->
24+
+ <requestHandler name="/componentdemo" class="solr.SearchHandler">
25+
+ <lst name="defaults">
26+
+ <str name="echoParams">explicit</str>
27+
+
28+
+ <!-- Query settings -->
29+
+ <str name="df">text</str>
30+
+ <str name="defType">edismax</str>
31+
+ <str name="qf">
32+
+ text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
33+
+ title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
34+
+ </str>
35+
+ <str name="mm">100%</str>
36+
+ <str name="q.alt">*:*</str>
37+
+ <str name="rows">10</str>
38+
+ <str name="fl">*,score</str>
39+
+
40+
+ <str name="facet">on</str>
41+
+ <str name="hl">on</str>
42+
+ <str name="spellcheck">on</str>
43+
+ </lst>
44+
+
45+
+ <!-- append spellchecking to our list of components -->
46+
+ <arr name="last-components">
47+
+ <str>spellcheck</str>
48+
+ </arr>
49+
+ </requestHandler>
50+
+
51+
<!-- Spell Check
52+
53+
The spell check component can return a list of alternative spelling
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
diff --git a/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml b/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
2+
index 17d07d3c23c..d130a823f00 100644
3+
--- a/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
4+
+++ b/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
5+
@@ -703,6 +703,39 @@
6+
<int name="xsltCacheLifetimeSeconds">5</int>
7+
</requestHandler>
8+
9+
+ <!-- A request handler for MLT queries.
10+
+ -->
11+
+ <requestHandler name="/mlt" class="solr.MoreLikeThisHandler" />
12+
+
13+
+ <!-- A request handler for Facet, Highlight, and Spellcheck components
14+
+ -->
15+
+ <requestHandler name="/componentdemo" class="solr.SearchHandler">
16+
+ <lst name="defaults">
17+
+ <str name="echoParams">explicit</str>
18+
+
19+
+ <!-- Query settings -->
20+
+ <str name="df">text</str>
21+
+ <str name="defType">edismax</str>
22+
+ <str name="qf">
23+
+ text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
24+
+ title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
25+
+ </str>
26+
+ <str name="mm">100%</str>
27+
+ <str name="q.alt">*:*</str>
28+
+ <str name="rows">10</str>
29+
+ <str name="fl">*,score</str>
30+
+
31+
+ <str name="facet">on</str>
32+
+ <str name="hl">on</str>
33+
+ <str name="spellcheck">on</str>
34+
+ </lst>
35+
+
36+
+ <!-- append spellchecking to our list of components -->
37+
+ <arr name="last-components">
38+
+ <str>spellcheck</str>
39+
+ </arr>
40+
+ </requestHandler>
41+
+
42+
<!-- Spell Check
43+
44+
The spell check component can return a list of alternative spelling

tests/Integration/Fixtures/docker/solr7_cloud/docker-compose.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: '3.7'
21
services:
32
solr1:
43
image: solr:7

tests/Integration/Fixtures/docker/solr7_server/docker-compose.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: '3'
21
services:
32
solr7:
43
image: solr:7

tests/Integration/Fixtures/docker/solr8_cloud/docker-compose.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: '3.7'
21
services:
32
solr1:
43
image: solr:8

tests/Integration/Fixtures/docker/solr8_server/docker-compose.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: '3'
21
services:
32
solr8:
43
image: solr:8

tests/Integration/Fixtures/docker/solr9_cloud/docker-compose.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: '3.7'
21
services:
32
solr1:
43
image: solr:9
@@ -7,6 +6,7 @@ services:
76
- 8981:8983
87
environment:
98
- ZK_HOST=zoo1:2181,zoo2:2181,zoo3:2181
9+
- SOLR_MODULES=extraction
1010
networks:
1111
- solr
1212
depends_on:
@@ -24,6 +24,7 @@ services:
2424
- 8982:8983
2525
environment:
2626
- ZK_HOST=zoo1:2181,zoo2:2181,zoo3:2181
27+
- SOLR_MODULES=extraction
2728
networks:
2829
- solr
2930
depends_on:
@@ -36,6 +37,7 @@ services:
3637
- 8983:8983
3738
environment:
3839
- ZK_HOST=zoo1:2181,zoo2:2181,zoo3:2181
40+
- SOLR_MODULES=extraction
3941
networks:
4042
solr:
4143
aliases:

tests/Integration/Fixtures/docker/solr9_server/docker-compose.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
version: '3'
21
services:
32
solr9:
43
image: solr:9
54
ports:
65
- 8983:8983
6+
environment:
7+
- SOLR_MODULES=extraction
78
networks:
89
solr:
910
aliases:

0 commit comments

Comments
 (0)