Skip to content

Commit c83b2d6

Browse files
minor symfony#45792 Improve testsuite (blueForman)
This PR was squashed before being merged into the 4.4 branch. Discussion ---------- Improve testsuite | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | symfony/symfony-docs#... Work done: Integration tests are excluded from unit testsuite because: - they are already tested in integration testsuite - they rely on enviroment and because of that they become skipped - they generate a huge list of false skipped tests in unit testsuite Fixed Predis Client initialization in CombinedStoreTest because ```array_combine(['host', 'port'], explode(':', getenv('REDIS_HOST')) + [1 => null])``` always results in ```localhost:``` as redis host which fails in host resolving Commits ------- 99c69e1 Improve testsuite
2 parents 13e0671 + 99c69e1 commit c83b2d6

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

.github/workflows/unit-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
([ -d "$COMPOSER_HOME" ] || mkdir "$COMPOSER_HOME") && cp .github/composer-config.json "$COMPOSER_HOME/config.json"
6767
6868
echo COLUMNS=120 >> $GITHUB_ENV
69-
echo PHPUNIT="$(pwd)/phpunit --exclude-group tty,benchmark,intl-data" >> $GITHUB_ENV
69+
echo PHPUNIT="$(pwd)/phpunit --exclude-group tty,benchmark,intl-data,integration" >> $GITHUB_ENV
7070
echo COMPOSER_UP='composer update --no-progress --ansi' >> $GITHUB_ENV
7171
7272
SYMFONY_VERSIONS=$(git ls-remote -q --heads | cut -f2 | grep -o '/[1-9][0-9]*\.[0-9].*' | sort -V)

src/Symfony/Component/Lock/Tests/Store/CombinedStoreTest.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
/**
2525
* @author Jérémy Derussé <jeremy@derusse.com>
26+
* @group integration
2627
*/
2728
class CombinedStoreTest extends AbstractStoreTest
2829
{
@@ -41,7 +42,8 @@ protected function getClockDelay()
4142
*/
4243
public function getStore(): PersistingStoreInterface
4344
{
44-
$redis = new \Predis\Client(array_combine(['host', 'port'], explode(':', getenv('REDIS_HOST')) + [1 => null]));
45+
$redis = new \Predis\Client(array_combine(['host', 'port'], explode(':', getenv('REDIS_HOST')) + [1 => 6379]));
46+
4547
try {
4648
$redis->connect();
4749
} catch (\Exception $e) {

src/Symfony/Component/Lock/Tests/Store/PdoStoreTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* @author Jérémy Derussé <jeremy@derusse.com>
2121
*
2222
* @requires extension pdo_sqlite
23+
* @group integration
2324
*/
2425
class PdoStoreTest extends AbstractStoreTest
2526
{

src/Symfony/Component/Lock/Tests/Store/ZookeeperStoreTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* @author Ganesh Chandrasekaran <gchandrasekaran@wayfair.com>
2121
*
2222
* @requires extension zookeeper
23+
* @group integration
2324
*/
2425
class ZookeeperStoreTest extends AbstractStoreTest
2526
{

0 commit comments

Comments
 (0)