Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Composer] Fixed failing integration tests #247

Merged
merged 3 commits into from
Oct 4, 2023

Conversation

alongosz
Copy link
Member

@alongosz alongosz commented Oct 3, 2023

Question Answer
JIRA issue n/a
Requires ezsystems/ezplatform-kernel#387
Type feature/bug/improvement
Target Ibexa version v3.3+
BC breaks no

For more details about the failure see ezsystems/ezplatform-kernel#387. Here I managed to get this working by smaller changes than anticipated:

  • Added league/flysystem-memory as some tests are executed using the new IbexaTestKernel and require it.
  • Added symfony/proxy-manager-bridge to resolve circular reference exception
  • Disabled process timeout for integration tests, the same way kernel does.

Known issues

As stated in ezsystems/ezplatform-kernel#387, we need to rethink the way we had those tests organized. It seems we need some more common shared search base tests so we don't rely on tests from kernel (by principle PHPUnit tests are not supposed to be executed externally). Maybe ibexa/test-core is a good place for that, but then it would be for Ibexa 4.x+ only.

I've also spotted locally the following E_NOTICE level error:

1) eZ\Publish\API\Repository\Tests\SearchEngineIndexingTest::testIndexContentWithNullField
Undefined property: stdClass::$content_name_s

./lib/ResultExtractor/NativeResultExtractor.php:56
./lib/ResultExtractor/NativeResultExtractor.php:36
./lib/ResultExtractor.php:188
./lib/ResultExtractor.php:70
./lib/Handler.php:154
./vendor/ezsystems/ezplatform-kernel/eZ/Publish/Core/Repository/SearchService.php:179
./vendor/ezsystems/ezplatform-kernel/eZ/Publish/Core/Repository/SearchService.php:98
./vendor/ezsystems/ezplatform-kernel/eZ/Publish/SPI/Repository/Decorator/SearchServiceDecorator.php:33
./vendor/ezsystems/ezplatform-kernel/eZ/Publish/Core/Repository/SiteAccessAware/SearchService.php:54
./vendor/ezsystems/ezplatform-kernel/eZ/Publish/API/Repository/Tests/SearchEngineIndexingTest.php:618

Seems CI has different error reporting settings, so leaving this one for later. The production code needs to trust less in the response fields returned by Solr Gateway.

Checklist:

  • Provided PR description.
  • Tested the solution manually.
  • Provided automated test coverage.
  • Checked that target branch is set correctly (main for features, the oldest supported for bugs).
  • Ran PHP CS Fixer for new PHP code (use $ composer fix-cs).
  • Asked for a review.

@alongosz alongosz changed the title [DO NOT MERGE] Testing ezsystems/ezplatform-kernel#387 [Composer] Fixed failing integration tests Oct 4, 2023
@alongosz alongosz marked this pull request as ready for review October 4, 2023 11:43
@alongosz alongosz requested review from Steveb-p and a team October 4, 2023 11:46
@Steveb-p Steveb-p requested a review from a team October 4, 2023 11:57
@alongosz alongosz force-pushed the fix-failing-solr-integration-tests branch from 9c8ef7e to 297f361 Compare October 4, 2023 12:51
@sonarcloud
Copy link

sonarcloud bot commented Oct 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@alongosz alongosz merged commit d7263fa into 3.3 Oct 4, 2023
22 checks passed
@alongosz alongosz deleted the fix-failing-solr-integration-tests branch October 4, 2023 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

5 participants