File tree 5 files changed +12
-13
lines changed
src/Symfony/Component/Lock
5 files changed +12
-13
lines changed Original file line number Diff line number Diff line change 36
36
services :
37
37
- memcached
38
38
- mongodb
39
+ - mysql
39
40
- redis-server
40
41
41
42
before_install :
Original file line number Diff line number Diff line change 19
19
<env name =" LDAP_PORT" value =" 3389" />
20
20
<env name =" REDIS_HOST" value =" localhost" />
21
21
<env name =" MEMCACHED_HOST" value =" localhost" />
22
+ <env name =" MYSQL_HOST" value =" 127.0.0.1" />
23
+ <env name =" MYSQL_USERNAME" value =" root" />
24
+ <env name =" MYSQL_PASSWORD" value =" " />
22
25
</php >
23
26
24
27
<testsuites >
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ class MysqlStore implements StoreInterface
26
26
private $ username ;
27
27
private $ password ;
28
28
private $ options ;
29
-
30
29
private $ waitTimeout ;
31
30
32
31
/**
Original file line number Diff line number Diff line change @@ -27,21 +27,17 @@ class MysqlStoreTest extends AbstractStoreTest
27
27
*/
28
28
public function getStore ()
29
29
{
30
- return new MysqlStore (getenv ('MYSQL_DSN ' ), array (
31
- 'db_username ' => getenv ('MYSQL_USER ' ),
30
+ return new MysqlStore (' mysql:host= ' . getenv ('MYSQL_HOST ' ), array (
31
+ 'db_username ' => getenv ('MYSQL_USERNAME ' ),
32
32
'db_password ' => getenv ('MYSQL_PASSWORD ' ),
33
+ 'wait_timeout ' => 1 ,
33
34
));
34
35
}
35
36
36
- /**
37
- * @medium
38
- *
39
- * @todo use phpunit/php-invoker to avoid infinite wait ?
40
- */
41
37
public function testConfigurableWaitTimeout ()
42
38
{
43
- $ store = new MysqlStore (getenv ('MYSQL_DSN ' ), array (
44
- 'db_username ' => getenv ('MYSQL_USER ' ),
39
+ $ store = new MysqlStore (' mysql:host= ' . getenv ('MYSQL_HOST ' ), array (
40
+ 'db_username ' => getenv ('MYSQL_USERNAME ' ),
45
41
'db_password ' => getenv ('MYSQL_PASSWORD ' ),
46
42
'wait_timeout ' => 1 ,
47
43
));
@@ -50,7 +46,7 @@ public function testConfigurableWaitTimeout()
50
46
$ key1 = new Key ($ resource );
51
47
$ key2 = new Key ($ resource );
52
48
53
- $ store ->waitAndSave ($ key1 );
49
+ $ store ->save ($ key1 );
54
50
55
51
$ startTime = microtime (true );
56
52
Original file line number Diff line number Diff line change 12
12
<ini name =" error_reporting" value =" -1" />
13
13
<env name =" REDIS_HOST" value =" localhost" />
14
14
<env name =" MEMCACHED_HOST" value =" localhost" />
15
- <env name =" MYSQL_DSN " value =" mysql:host=localhost " />
16
- <env name =" MYSQL_USER " value =" root" />
15
+ <env name =" MYSQL_HOST " value =" 127.0.0.1 " />
16
+ <env name =" MYSQL_USERNAME " value =" root" />
17
17
<env name =" MYSQL_PASSWORD" value =" " />
18
18
</php >
19
19
You can’t perform that action at this time.
0 commit comments