From 21c4c83850f3224dfff655cb1ed25d01c5ebbb28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Szo=C5=82tysek?= Date: Tue, 28 Jan 2025 14:30:00 +0100 Subject: [PATCH 1/2] IBX-8543: Verify newer DBMS versions --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3d110a576e..e9390da75f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -78,7 +78,7 @@ jobs: needs: tests services: postgres: - image: postgres:10 + image: postgres:14 ports: - 5432 env: @@ -131,7 +131,7 @@ jobs: needs: tests services: mysql: - image: mysql:5.7 + image: mysql:8.0 ports: - 3306/tcp env: From 9b3fe8c46d62adfc5f82797e0e74b06d8e4611e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Szo=C5=82tysek?= Date: Thu, 30 Jan 2025 15:33:23 +0100 Subject: [PATCH 2/2] collationFixedCriterion --- .../SearchService/RemoteIdIndexingTest.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tests/integration/Core/Repository/SearchService/RemoteIdIndexingTest.php b/tests/integration/Core/Repository/SearchService/RemoteIdIndexingTest.php index 0d5338be04..b25003e4d9 100644 --- a/tests/integration/Core/Repository/SearchService/RemoteIdIndexingTest.php +++ b/tests/integration/Core/Repository/SearchService/RemoteIdIndexingTest.php @@ -55,9 +55,20 @@ public function testIndexingRemoteId(Criterion $criterion): void $contentId = self::$contentIdByRemoteIdIndex[$remoteId]; + // ensure correct collation for comparison + $collationFixedCriterion = new Criterion\RemoteId([ + new Criterion\LogicalAnd([ + new Criterion\Comparison( + 'remote_id', + Criterion\Operator::EQ, + $remoteId . " COLLATE utf8mb4_unicode_ci" + ) + ]) + ]); + // test searching using both Content & Location remote IDs for both Content items $query = new Query(); - $query->filter = $criterion; + $query->filter = $collationFixedCriterion; $result = $searchService->findContent($query); self::assertSame( 1, @@ -67,7 +78,7 @@ public function testIndexingRemoteId(Criterion $criterion): void self::assertSame($contentId, $result->searchHits[0]->valueObject->id); $query = new LocationQuery(); - $query->filter = $criterion; + $query->filter = $collationFixedCriterion; $result = $searchService->findLocations($query); self::assertSame( 1,