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

anorgan / QuTee
57%

Build:
DEFAULT BRANCH: master
Repo Added 05 May 2014 09:38PM UTC
Files 9
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

LAST BUILD ON BRANCH master
branch: SELECT
CHANGE BRANCH
x
  • No branch selected
  • master
  • v0.9.1
  • v0.9.2
  • v0.9.3

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

Relevant lines Covered
Build:
Build:
265 RELEVANT LINES 150 COVERED LINES
3.47 HITS PER LINE
Source Files on master
  • List 0
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
55 master 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 `_testConnec... Pull #21 04 Nov 2017 03:47PM UTC web-flow travis-ci pending completion  
54 master Provide method name to TaskInterface allows for the task object to take the form ``` class myTask implements TaskInterface { protected $_data; public function run($methodName='') { if(method_exists($this, $methodName)){ ... Pull #20 16 Feb 2017 10:42AM UTC web-flow travis-ci pending completion  
53 v0.9.3 Stop race condition poling Persistor (#19) push 15 Feb 2017 02:02PM UTC anorgan travis-ci pending completion  
52 master Stop race condition poling Persistor (#19) push 15 Feb 2017 01:58PM UTC anorgan travis-ci pending completion  
51 master Stop race condition poling Persistor Pull #19 15 Feb 2017 01:47PM UTC web-flow travis-ci pending completion  
50 v0.9.2 When testing for task uniqueness, don't take into account taken tasks push 04 Dec 2015 10:49AM UTC anorgan travis-ci pending completion  
49 master When testing for task uniqueness, don't take into account taken tasks push 04 Dec 2015 10:46AM UTC anorgan travis-ci pending completion  
48 v0.9.1 Up the version of symfony event dispatcher push 03 Dec 2015 10:54AM UTC anorgan travis-ci pending completion  
47 master Up the version of symfony event dispatcher push 03 Dec 2015 10:51AM UTC anorgan travis-ci pending completion  
46 master Coverals push 07 Apr 2015 11:03PM UTC Marin Crnković travis-ci pending completion  
See All Builds (11)
  • Repo on GitHub
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