-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from gregorg/feature/handle_slave_delay
Feature: handle slave delay + fix master/slave distribution + fix unit tests
- Loading branch information
Showing
14 changed files
with
349 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,10 @@ | |
{ | ||
"name": "Mathieu Rochette", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Grégory Duchatelet", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"autoload": { | ||
|
@@ -13,9 +17,10 @@ | |
} | ||
}, | ||
"require": { | ||
"php": "^7.1", | ||
"php": "^7", | ||
"doctrine/dbal": "^2.5.2", | ||
"psr/cache": "^1.0.0" | ||
"psr/cache": "^1.0", | ||
"cache/apcu-adapter": "^1.0" | ||
}, | ||
"require-dev": { | ||
"behat/behat": "~3.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
extension=apcu.so | ||
zend.assertions = On | ||
|
||
[Assertion] | ||
; Assert(expr); active by default. | ||
; http://php.net/assert.active | ||
assert.active = On | ||
|
||
; Issue a PHP warning for each failed assertion. | ||
; http://php.net/assert.warning | ||
assert.warning = On | ||
assert.exception = On | ||
|
||
; Don't bail out by default. | ||
; http://php.net/assert.bail | ||
;assert.bail = Off | ||
|
||
; User-function to be called if an assertion fails. | ||
; http://php.net/assert.callback | ||
;assert.callback = 0 | ||
|
||
; Eval the expression with current error_reporting(). Set to true if you want | ||
; error_reporting(0) around the eval(). | ||
; http://php.net/assert.quiet-eval | ||
;assert.quiet_eval = 0 | ||
|
||
[apc] | ||
apc.enabled=1 | ||
apc.shm_size=4M | ||
apc.ttl=60 | ||
apc.user_ttl=60 | ||
apc.enable_cli=1 | ||
apc.gc_ttl=600 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
use Behat\Behat\Context\Context; | ||
use Behat\Behat\Context\SnippetAcceptingContext; | ||
|
||
class MysqlReplicContext implements Context, SnippetAcceptingContext | ||
{ | ||
use FeatureContext; | ||
use MySQLContext; | ||
|
||
private function masterParams($username = null, $password = '') { | ||
$params = [ | ||
'host' => '192.168.0.8', | ||
'user' => $username === null ? 'mcm' : $username, | ||
'password' => 'uvieng7c', | ||
'dbname' => 'mcm', | ||
]; | ||
return $this->params($params); | ||
} | ||
/** | ||
* @BeforeScenario | ||
*/ | ||
public function clearConnections() { | ||
} | ||
|
||
/** | ||
* @BeforeScenario | ||
*/ | ||
public function clearDatabase() { | ||
} | ||
|
||
/** | ||
* @BeforeScenario | ||
*/ | ||
public function assertNoActiveConnection() { | ||
} | ||
|
||
private function params(Array $params) | ||
{ | ||
$params['driver'] = 'mysqli'; | ||
return $params; | ||
} | ||
|
||
private function defaultDatabaseName() | ||
{ | ||
return 'mcm'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.