Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Since the 7/12/2013 we have had 6 failures in ImageFieldDisplayTest in 8.x branch testing. The failure mode always seems to be the same.
Drupal core - 8.x fail: https://qa.drupal.org/8.x-status
Overall Summary
==============================================
FAILED: [[SimpleTest]]: [MySQL] 59,165 pass(es), 2 fail(s), and 1 exception(s).
Individual Environment Summaries
==============================================
-- [[SimpleTest]]: [MySQL] --
* Drupal\image\Tests\ImageFieldDisplayTest (131 pass(es), 2 fail(s), and 1 exception(s))
- [fail] [Completion check] "The test did not complete due to a fatal error." in ImageFieldDisplayTest.php on line 229 of Drupal\image\Tests\ImageFieldDisplayTest->testImageFieldDefaultImage().
- [fail] [Browser] "POST http://drupalorgqa.ctidigital.com/checkout/admin/structure/types/manage/article/fields/node.article.rnououka/field returned 0 (0 bytes)." in ImageFieldDisplayTest.php on line 251 of Drupal\image\Tests\ImageFieldDisplayTest->testImageFieldDefaultImage().
- [exception] [Warning] "array_flip(): Can only flip STRING and INTEGER values!array_flip(Array)
Drupal\Core\Entity\FieldableDatabaseStorageController->loadMultiple(Array)
Drupal\Core\Entity\FieldableDatabaseStorageController->load(NULL)
entity_load('file', NULL, )
file_load(NULL)
Drupal\image\Tests\ImageFieldDisplayTest->testImageFieldDefaultImage()
Drupal\simpletest\TestBase->run()
simpletest_script_run_one_test('388', 'Drupal\image\Tests\ImageFieldDisplayTest')
" in FieldableDatabaseStorageController.php on line 212 of Drupal\Core\Entity\FieldableDatabaseStorageController->loadMultiple().
Comment | File | Size | Author |
---|---|---|---|
#12 | 11-12-interdiff.txt | 1.01 KB | alexpott |
#12 | 2174997.12.patch | 1.29 KB | alexpott |
#11 | 2174997.11.patch | 1.21 KB | alexpott |
#11 | 2174997.11.will-fail.patch | 835 bytes | alexpott |
Comments
Comment #1
jthorson CreditAttribution: jthorson commentedLooking at the testbot apache logs, I'm seeing a lot of 'Internal Server Error' exceptions, as well as 'table simpletestxxxxxxsemaphore' doesn't exist exceptions.
There's also a 'Call to member function hasPath() on a non-object in views_ui/ViewListController.php line 261', but that one seems familiar and may already have been there for quite some time.
The Internal Server Error messages may be related, but other than that, I don't see anything in the log that might help provide further insight. :(
Comment #2
tim.plunkettThis usually means that the file was not created on disk, so you can't call any methods on it.
Comment #3
BerdirThe reason that we opened this issue is that this happened ~6 times in the last month on HEAD alone, in the same class, so it is possible that this there is something specific to this test and not a generic testbot problem. N ot sure about moving it over...
Comment #4
BerdirSame test fail in https://qa.drupal.org/pifr/test/577203.
I did manage to make this fail once locally in (in 100+ runs), so I don't think it's (only) a testbot problem.
Was not able to see anything that could have gotten wrong, the image field and instance did exist and I was able to save them manually. Now running the tests again with dblog enabled, hoping that I will see some errors there...
Comment #5
jthorson CreditAttribution: jthorson commentedBack to Core as per #4.
Comment #6
BerdirAnother one in https://qa.drupal.org/pifr/test/714398
Comment #7
damiankloip CreditAttribution: damiankloip commentedJust had this again in #2119905: Provide @ConfigEntityType and @ContentEntityType to have better defaults.
Comment #8
sunCorrecting issue tag.
@jhodgdon provided extensive test results debugging info including review log in #2191563: Random test failure in ImageFieldDisplayTest
Based on my analysis in that issue, the root cause is definitely WebTestBase::drupalGetTestFiles('image'), but that function does nothing else than to copy some files with static filenames from the Simpletest module directory into the public files directory of the test environment.
After copying, the target directory is scanned again for the copied files. The discovered and returned $files array is empty, which causes the subsequent usage of $file->uri and file_load() to operate on a NULL value.
Comment #9
xjmHEAD has failed on this one twice this week and numerous times over the past couple months.
Comment #10
catchComment #11
alexpottIt's our old friend randomString again! :)
The post form fails if $alt =
This is being caused by strings starting with an @ and curl post - if you test this manually there is no issue. I think it has something to do with how file uploads work - see http://uk1.php.net/curl_setopt - specifically CURLOPT_POSTFIELDS.
Patches attached to prove failure mode and a very simple fix.
Comment #12
alexpottA slightly better patch.
Comment #14
BerdirWelcome to episode #57 of "How randomString() is messing with our tests."
Nice find, fix looks good.
Comment #15
catchCommitted/pushed to 8.x, thanks!