mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
Fix #1705 : MySQL connection might be lost after long operations
This commit is contained in:
13
tests/classes/connectionTest.php
Normal file
13
tests/classes/connectionTest.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
class connectionTest extends \PhraseanetPHPUnitAbstract
|
||||
{
|
||||
public function testMysqlTimeoutIsHandled()
|
||||
{
|
||||
$conn = connection::getPDOConnection(self::$DI['app']);
|
||||
$conn->exec('SET @@local.wait_timeout= 1');
|
||||
usleep(1200000);
|
||||
$conn->exec('SHOW DATABASES');
|
||||
connection::close_connections();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user