Parallel PHP Unit runs sometimes fail

Created on 21 October 2024, 2 months ago

Problem/Motivation

PHPUnit has a random(?) fail. https://git.drupalcode.org/project/spambot/-/pipelines Likely not being handled correctly the timelimit on spambot_report_account()

    catch (Exception $e) {
      return FALSE;
    }
    $data = !empty($result) ? $result->getBody()->getContents() : '';
    if (!empty($result->getStatusCode()) && $result->getStatusCode() == 200 && !empty($data) && stripos($data, 'data submitted successfully') !== FALSE) {
      $success = TRUE;
    }
    elseif (stripos($data, 'duplicate') !== FALSE) {
      // www.stopforumspam.com can return a 503 code
      // with data = '<p>recent duplicate entry</p>'
      // which we will treat as successful.
      $success = TRUE;
    }

Steps to reproduce

Run PHP unit multiple times in close succession?

Proposed resolution

TBD

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇨🇦Canada nickdickinsonwilde Victoria, BC (T'So-uke lands)

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

Comments & Activities

Production build 0.71.5 2024