Skip to content

Commit

Permalink
fix failing dev tests on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaicher committed Apr 26, 2024
1 parent 92c9a38 commit 6d0a9b6
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Expand Up @@ -10,7 +10,7 @@ jobs:
SYMFONY_REQUIRE: "${{ matrix.symfony_require }}"
services:
mysql:
image: mysql:5.7
image: mysql:8.0
env:
MYSQL_ALLOW_EMPTY_PASSWORD: true
ports:
Expand All @@ -20,8 +20,6 @@ jobs:
fail-fast: false
matrix:
include:
- php: 7.3
test_make_target: test_phpunit_legacy
- php: 7.4
composer_flags: --prefer-lowest
test_make_target: test_phpunit_legacy
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -18,7 +18,7 @@
}
],
"require": {
"php": "^7.3 || ^8.0",
"php": "^7.4 || ^8.0",
"ext-json": "*",
"doctrine/dbal": "^3.3 || ^4.0",
"doctrine/doctrine-bundle": "^2.2.2",
Expand Down
18 changes: 18 additions & 0 deletions tests/Functional/PhpunitTest.php
Expand Up @@ -52,6 +52,24 @@ public static function someDataProvider(): iterable
yield [0];
}

public function testChangeDbStateForConnectionWithoutServerVersion(): void
{
$this->connection = $this->kernel->getContainer()->get('doctrine.dbal.no_server_version_connection');
$this->assertRowCount(0);
$this->insertRow();
$this->assertRowCount(1);
}

/**
* @depends testChangeDbStateForConnectionWithoutServerVersion
*/
public function testChangeDbStateForConnectionWithoutServerVersionRolledBack(): void
{
$this->connection = $this->kernel->getContainer()->get('doctrine.dbal.no_server_version_connection');
$this->assertRowCount(0);
$this->assertFalse($this->connection->isTransactionActive());
}

public function testChangeDbStateForReplicaConnection(): void
{
$this->connection = $this->kernel->getContainer()->get('doctrine.dbal.replica_connection');
Expand Down
4 changes: 4 additions & 0 deletions tests/Functional/app/config.yml
Expand Up @@ -11,6 +11,10 @@ doctrine:
url: '%database.url%'
server_version: 8.0.31
use_savepoints: true

no_server_version:
url: '%database.url%'
use_savepoints: true

replica:
url: '%database.url%'
Expand Down

0 comments on commit 6d0a9b6

Please sign in to comment.