UpdatePathBase has the following code:

  /**
   * {@inheritdoc}
   */
  protected function rebuildAll() {
    parent::rebuildAll();

    // Remove the notices we get due to the menu link rebuild prior to running
    // the system updates for the schema change.
    foreach ($this->assertions as $key => $assertion) {
      if ($assertion['message_group'] == 'Notice' && basename($assertion['file']) == 'MenuTreeStorage.php' && strpos($assertion['message'], 'unserialize(): Error at offset 0') !== FALSE) {
        unset($this->assertions[$key]);
        $this->deleteAssert($assertion['message_id']);
        $this->results['#exception']--;
      }
    }
  }

Unfortunately this hack doesn't work when you use --die-on-fail.

The quick fix would be to add a try/catch around this.

CommentFileSizeAuthor
#5 2549045-5.patch822 bytespwolanin

Comments

neclimdul created an issue. See original summary.

neclimdul’s picture

Personally, I'm not really sure this is a sustainable approach. If we can it would be nice if we had a more solid approach to this problem. I don't know what that is though.

pwolanin’s picture

You can't really try/catch since you don't want to break out of the logic. You also don't want to suppress errors since you want to see others - maybe this test can change the die on fail behavior?

pwolanin’s picture

Status: Active » Needs review
StatusFileSize
new822 bytes
neclimdul’s picture

Yeah, I was mistaken anyways. Throwing an exception would be the logical thing for simpletest to do in this case. Instead it prints the error and calls exit giving not way to work around excepted notices.

neclimdul’s picture

Status: Needs review » Reviewed & tested by the community

solves the problem.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 3b3680e and pushed to 8.0.x. Thanks!

  • alexpott committed 3b3680e on 8.0.x
    Issue #2549045 by pwolanin, neclimdul: Update Tests can't run with --die...

Status: Fixed » Closed (fixed)

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