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

Issue fork spambot-3482209

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

nickdickinsonwilde created an issue. See original summary.

nickdickinsonwilde’s picture

Status: Active » Fixed

Test for duplicate message was in the wrong spot.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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