Problem/Motivation
Drupal\KernelTests\Core\Entity\CreateSampleEntityTest::testSampleValueContentEntity can randomly fail.
There was 1 failure:
1) Drupal\KernelTests\Core\Entity\CreateSampleEntityTest::testSampleValueContentEntity
Failed asserting that actual size 1 matches expected size 0.
/var/www/html/core/tests/Drupal/KernelTests/Core/Entity/CreateSampleEntityTest.php:81
https://www.drupal.org/pift-ci-job/1425347
https://www.drupal.org/pift-ci-job/1425317
https://www.drupal.org/pift-ci-job/1422878
77 // Create sample entities without bundles.
78 else {
79 $entity = $this->entityTypeManager->getStorage($entity_type_id)->createWithSampleValues(FALSE, $values);
80 $violations = $entity->validate();
81 $this->assertCount(0, $violations);
82 if ($label) {
83 $this->assertEquals($title, $entity->label());
84 }
}
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 3086001-9.patch | 737 bytes | alexpott |
| #9 | 3086001-9.test.patch | 2.96 KB | alexpott |
| #7 | 3086001-6.test-only.patch | 3.41 KB | alexpott |
| #4 | 3086001-4-test-only-repeat-500.patch | 3.01 KB | krzysztof domański |
| #3 | 3086001-3-test-only-repeat-500.patch | 3.01 KB | krzysztof domański |
Comments
Comment #1
krzysztof domańskiKrzysztof Domański created an issue. See original summary.
Comment #2
krzysztof domańskiComment #3
krzysztof domańskiDebugging...
Sometimes the
$valuesare an empty array.Comment #4
krzysztof domańskiDebugging
$entity_type_id.This is
"path_alias".Comment #5
plachAnother instance: https://www.drupal.org/pift-ci-job/1428851
Comment #6
plachRandom test failures are usually critical.
Comment #7
alexpottLet's see what the violation actually is.
Comment #9
alexpottHere's a fix. It's happening because occasionally we generate a string 255 chars long and then add a character to it :)
Comment #10
plachLooks good!
Comment #12
catchCommitted b541e05 and pushed to 8.8.x. Thanks!
Comment #14
xjm