• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

anorgan / QuTee / 55
57%

Build:
DEFAULT BRANCH: master
Ran 04 Nov 2017 03:47PM UTC
Jobs 3
Files 9
Run time 51s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
55

Pull #21

travis-ci

web-flow
Long running process race condition

Trying to recreate a task after a long running process ends in a race condition in the pdo module (actually any db calls through the pdo module for this task)

When you pass the pdo object to the `_testConnection(\PDO $pdo)` function its actually receives the value of the reference to the pdo object.
Setting it to null in the catch statement doesn't set `$this->_pdo = null;` only the local `$pdo` variable
You need to pass it a reference to the reference

To test firstly see what you're mysql timeouts are set to using
```
SHOW VARIABLES LIKE 'wait_timeout';
SHOW VARIABLES LIKE 'interactive_timeout';
```
put a sleep in your test task longer than the largest one (its in seconds)
see a race condition as `$this->_testConnection()` calls `$this->_getPdo();` while `$this->_pdo` stays not null.... and repeat

At least this is so in php v5.6.32
mh
Pull Request #21: Long running process race condition

150 of 265 relevant lines covered (56.6%)

3.47 hits per line

Jobs
ID Job ID Ran Files Coverage
3 55.3 04 Nov 2017 03:48PM UTC 0
56.82
Travis Job 55.3
4 55.4 04 Nov 2017 03:47PM UTC 0
56.82
Travis Job 55.4
5 55.5 04 Nov 2017 03:47PM UTC 0
57.63
Travis Job 55.5
Source Files on build 55
  • Tree
  • List 0
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #55
  • Pull Request #21
  • PR Base - master (#52)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc