Fix the random test failure on ChatTest

Created on 15 January 2025, 18 days ago

Problem/Motivation

Maybe one time out of 10 or 20 or so there is a reoccuring test failure, that can be fixed by rerunning the test.

Its always in PHPCS (previous major) with the following:

---- Drupal\Tests\ai_eca\Kernel\Plugin\Action\ChatTest ----
Status    Group      Filename          Line Function                            
--------------------------------------------------------------------------------
Fail      Other      phpunit-3.xml        0 Drupal\Tests\ai_eca\Kernel\Plugin\A
    PHPUnit Test failed to complete; Error: PHPUnit 9.6.22 by Sebastian
    Bergmann and contributors.
    
    Testing Drupal\Tests\ai_eca\Kernel\Plugin\Action\ChatTest
    ..F.                                                                4 / 4
    (100%)
    
    Time: 00:04.422, Memory: 12.00 MB
    
    There was 1 failure:
    
    1) Drupal\Tests\ai_eca\Kernel\Plugin\Action\ChatTest::testWithoutInput
    Failed asserting that 'Hello world! Input: GtHM>&{" My AI/ECA site
    n6d56i93: 'KO"''>&b('\n
    . Config: [].' contains "KO"'>&b(".
    
    /builds/project/ai/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:122
    /builds/project/ai/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:56
    /builds/project/ai/modules/ai_eca/tests/src/Kernel/Plugin/Action/ChatTest.php:124
    /builds/project/ai/vendor/phpunit/phpunit/src/Framework/TestResult.php:729
    
    FAILURES!
    Tests: 4, Assertions: 31, Failures: 1.
---- Drupal\Tests\ai\Kernel\OperationType\Chat\ChatInterfaceTest ----

Proposed resolution

Figure out why it is failing randomly.
Fix it.

🐛 Bug report
Status

Active

Version

1.0

Component

Other Submodules

Created by

🇩🇪Germany marcus_johansson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024