Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1e97cf2

Browse files
committed
Reverting removal of lock tests paragraph; minor fixes
1 parent 2c70f4e commit 1e97cf2

1 file changed

Lines changed: 25 additions & 7 deletions

File tree

tests/README.markdown

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,34 @@ To execute the Doctrine2 testsuite, you just need to execute this simple steps:
99

1010
All this is (normally) done with:
1111

12-
```
13-
git clone [email protected]:doctrine/doctrine2.git
14-
cd doctrine2
15-
composer install
16-
./vendor/bin/phpunit
17-
```
12+
git clone [email protected]:doctrine/doctrine2.git
13+
cd doctrine2
14+
composer install
15+
./vendor/bin/phpunit
1816

1917
## Pre-requisites
2018
Doctrine2 works on many database vendors; the tests can detect the presence of installed vendors, but you need at least one of those; the easier to install is SQLite.
2119

22-
If you're using a Debian-derivative Linux distribution, you can install SQLite with:
20+
If you're using Debian, or a Debian-derivate Linux distribution (like Ubuntu), you can install SQLite with:
2321

2422
sudo apt-get install sqlite
23+
24+
## Testing Lock-Support
25+
26+
The Lock support in Doctrine 2 is tested using Gearman, which allows to run concurrent tasks in parallel.
27+
Install Gearman with PHP as follows:
28+
29+
1. Go to http://www.gearman.org and download the latest Gearman Server
30+
2. Compile it and then call ldconfig
31+
3. Start it up "gearmand -vvvv"
32+
4. Install pecl/gearman by calling "gearman-beta"
33+
34+
You can then go into `tests/` and start up two workers:
35+
36+
php Doctrine/Tests/ORM/Functional/Locking/LockAgentWorker.php
37+
38+
Then run the locking test-suite:
39+
40+
phpunit --configuration <myconfig.xml> Doctrine/Tests/ORM/Functional/Locking/GearmanLockTest.php
41+
42+
This can run considerable time, because it is using sleep() to test for the timing ranges of locks.

0 commit comments

Comments
 (0)