This is causing fatal errors in tests (spotted by Damien), which don't get reported as fails because the test just gets skipped.

// Merge body field value and format separately.
    $body = array(
      'value' => $this->randomName(32),
      'format' => FILTER_FORMAT_DEFAULT
    );
    $settings['body'][0] += $body;

    $node = (object) $settings;
    node_save($node);
CommentFileSizeAuthor
#9 php_node.patch543 bytesandypost
#1 field_body_fix_test.patch680 bytesyched
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yched’s picture

Status: Active » Needs review
FileSize
680 bytes

drupalCreateNode() was updated for body as field - perhaps with a couple overlooked issues.

Going through all drupalCreateNode() calls, the only bug I could find was in php.test, incorrect format for the 'body' value.
Other than that, I don't see what would cause fatal errors, so a more specific report would be welcome.

bjaspan’s picture

A more important question is why fatal errors are not reported by the tests. If that is possible, it is guaranteed that the problem occurs all over the place.

catch’s picture

Thought I'd pasted the error message, but clearly hadn't - the error was unsupported operand types in drupal_web_test_case.php - don't have that line number handy but must be the += there.

yched’s picture

re catch: Yes, the error seems pretty clear, but I don't see why it would happen - apart from the one case fixed in the patch above.
If Damien has more informations, they are welcome :-)

Of course, the test system needs to be fixed so that fatal errors are reported, but I think there's already an issue about that.

Damien Tournoud’s picture

Here is the error message.

Fatal error: Unsupported operand types in /var/www/drupal/sites/default/files/checkout/modules/simpletest/drupal_web_test_case.php on line 679

It only happens in two (unidentified) test cases.

yched’s picture

OK, if it's not possible to know more (which tests), then how much does the patch in #1 makes things better ?

Status: Needs review » Needs work

The last submitted patch failed testing.

andypost’s picture

Status: Needs work » Needs review
FileSize
543 bytes

Same patch, tested localy and stoping as from g2 testing

So duplicate #503116: I test failed

andypost’s picture

It's really interesting why tesbot v1 still not check fir notices? We need pifr 2

boombatower’s picture

Err...I'll have to look into this..but it reports notices (give you the worst case example to date): http://testing.drupal.org/pifr/file/1/theme.inc_.head__0_1.patch.

Failed: 10873 passes, 4 fails, 813795 exceptions

Complete annihilation with the addition of 4 lines. Extreme patch. :)

andypost’s picture

Status: Needs review » Reviewed & tested by the community

chx and yched patches are same so lets commit it

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD!

Is there a follow-up issue somewhere for "Why isn't test bot reporting fatal errors?" If not, can someone make one? :)

catch’s picture

There's an issue for fatal errors somewhere.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.