Skip to content

Commit

Permalink
port and version check
Browse files Browse the repository at this point in the history
  • Loading branch information
krowinski committed Jan 29, 2024
1 parent cd35e17 commit 334e04f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ services:
replication-test-mysql-percona:
container_name: replication-test-mysql-percona
hostname: replication-test-mysql-percona
image: mysql:8.2
image: mysql:8.0
platform: linux/amd64
command: [
'--character-set-server=utf8mb4',
Expand All @@ -18,5 +18,5 @@ services:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=mysqlreplication_test
ports:
- "3322:3306/tcp"
- "3306:3306/tcp"
restart: unless-stopped
2 changes: 1 addition & 1 deletion example/benchmark.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class benchmark
private const DB_USER = 'root';
private const DB_PASS = 'root';
private const DB_HOST = '127.0.0.1';
private const DB_PORT = 3322;
private const DB_PORT = 3306;

private MySQLReplicationFactory $binLogStream;

Expand Down
2 changes: 1 addition & 1 deletion example/dump_events.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
->withUser('root')
->withHost('0.0.0.0')
->withPassword('root')
->withPort(3322)
->withPort(3306)
->withHeartbeatPeriod(60)
->withEventsIgnore([ConstEventType::HEARTBEAT_LOG_EVENT->value])
->build(),
Expand Down
4 changes: 2 additions & 2 deletions tests/Integration/BaseCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ protected function setUp(): void
->withUser('root')
->withHost('0.0.0.0')
->withPassword('root')
->withPort(3322)
->withPort(3306)
->withEventsIgnore([ConstEventType::GTID_LOG_EVENT->value]);

$this->connect();

if ($this->checkForVersion(8.4) && $this->mySQLReplicationFactory?->getServerInfo()->isGeneric()) {
if ($this->mySQLReplicationFactory?->getServerInfo()->versionRevision >= 8 && $this->mySQLReplicationFactory?->getServerInfo()->isGeneric()) {
self::assertInstanceOf(RotateDTO::class, $this->getEvent());
}
self::assertInstanceOf(FormatDescriptionEventDTO::class, $this->getEvent());
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/BasicTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ private function connectWithProvidedEventDispatcher(EventDispatcherInterface $ev
$this->connection->executeStatement('USE ' . $this->database);
$this->connection->executeStatement('SET SESSION sql_mode = \'\';');

if ($this->checkForVersion(8.4) && $this->mySQLReplicationFactory->getServerInfo()->isGeneric()) {
if ($this->mySQLReplicationFactory->getServerInfo()->versionRevision >= 8 && $this->mySQLReplicationFactory->getServerInfo()->isGeneric()) {
self::assertInstanceOf(RotateDTO::class, $this->getEvent());
}

Expand Down

0 comments on commit 334e04f

Please sign in to comment.