QueueTest - Be more forgiving about slow execution
authorTim Otten <totten@civicrm.org>
Sun, 7 Jun 2020 04:29:17 +0000 (21:29 -0700)
committerTim Otten <totten@civicrm.org>
Sun, 7 Jun 2020 04:29:17 +0000 (21:29 -0700)
commit35d090e2d848c3731dcdda846424c6c5dd1f4a1a
tree411749ba5158481eab60803bdf96e5ec0136ab49
parent88890043ac49640303937f87cd35cac609bbc234
QueueTest - Be more forgiving about slow execution

The `CRM_Queue_QueueTest` is producing failures with the
[TIME_FUNC](https://github.com/civicrm/civicrm-core/pull/17414) option of
`linear:500` (the value currently used in PR test runs) -- which is to say,
it fails when the system runs very slowly (with some 500ms stalling during
execution).

This gets it working under some very slow scenarios:

```
for TIME_FUNC in natural frozen linear:500 linear:1250 prng:500 prng:666 prng:1000 prng:1500 ; do
  export TIME_FUNC;
  echo;
  echo "TIME_FUNC=$TIME_FUNC" ;
  env CIVICRM_UF=UnitTests phpunit6 tests/phpunit/CRM/Queue/QueueTest.php ;
done
```
tests/phpunit/CRM/Queue/QueueTest.php