Skip to content

Commit 6adbd6d

Browse files
Solr 9.7 → 9.8 for integration tests (#1146)
1 parent 354b915 commit 6adbd6d

18 files changed

Lines changed: 133 additions & 13 deletions

.github/workflows/run-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,20 @@ 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 -

examples/2.7.1-extract-query.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
require_once(__DIR__.'/init.php');
44
htmlHeader();
55

6+
echo '<h2>Note: The <code>extraction</code> <a href="https://solr.apache.org/guide/solr/latest/configuration-guide/solr-modules.html" target="_blank">Solr Module</a> needs to be enabled to run this example!</h2>';
7+
68
// create a client instance
79
$client = new Solarium\Client($adapter, $eventDispatcher, $config);
810

examples/2.7.2-extract-query-extract-only.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
require_once(__DIR__.'/init.php');
44
htmlHeader();
55

6+
echo '<h2>Note: The <code>extraction</code> <a href="https://solr.apache.org/guide/solr/latest/configuration-guide/solr-modules.html" target="_blank">Solr Module</a> needs to be enabled to run this example!</h2>';
7+
68
// create a client instance
79
$client = new Solarium\Client($adapter, $eventDispatcher, $config);
810

examples/2.7.3.1-extract-query-generated-content.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
require_once(__DIR__.'/init.php');
44
htmlHeader();
55

6+
echo '<h2>Note: The <code>extraction</code> <a href="https://solr.apache.org/guide/solr/latest/configuration-guide/solr-modules.html" target="_blank">Solr Module</a> needs to be enabled to run this example!</h2>';
7+
68
// create a client instance
79
$client = new Solarium\Client($adapter, $eventDispatcher, $config);
810

examples/2.7.3.2-extract-query-pdo-lob.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
require_once(__DIR__.'/init.php');
44
htmlHeader();
55

6+
echo '<h2>Note: The <code>extraction</code> <a href="https://solr.apache.org/guide/solr/latest/configuration-guide/solr-modules.html" target="_blank">Solr Module</a> needs to be enabled to run this example!</h2>';
67
echo "<h2>Note: This example doesn't work in PHP &lt; 8.1.0!</h2>";
78
echo "<h2>Note: This example requires the PDO_SQLITE PDO driver (enabled by default in PHP)</h2>";
89

tests/Integration/AbstractTechproductsTestCase.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,23 @@ public static function setUpBeforeClass(): void
196196
self::$client->update($update);
197197
}
198198

199+
// UTF8TEST was removed for Solr 9.8 in SOLR-17556
200+
if (9 <= self::$solrVersion) {
201+
$update = self::$client->createUpdate();
202+
203+
$utf8test = $update->createDocument();
204+
$utf8test->setField('id', 'UTF8TEST');
205+
$utf8test->setField('manu', 'Apache Software Foundation');
206+
$utf8test->setField('cat', 'software');
207+
$utf8test->setField('cat', 'search');
208+
$utf8test->setField('features', 'êâîôû');
209+
$utf8test->setField('price', 0.0);
210+
$utf8test->setField('inStock', true);
211+
212+
$update->addDocument($utf8test);
213+
self::$client->update($update);
214+
}
215+
199216
$update = self::$client->createUpdate();
200217
$update->addCommit(true, true);
201218
self::$client->update($update);
File renamed without changes.
File renamed without changes.
File renamed without changes.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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 @@
@@ -11,7 +11,7 @@ index 06ac9b3d2e6..087287d2339 100644
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 @@
14+
@@ -991,6 +993,39 @@
1515

1616
-->
1717

0 commit comments

Comments
 (0)