Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix sharding for empty tests file #6667

Merged
merged 1 commit into from Jun 2, 2023
Merged

Conversation

SamMousa
Copy link
Collaborator

A file without tests will cause sharding to break:

Fatal error: Uncaught ValueError: array_chunk(): Argument #2 ($length) must be greater than 0 in /project/vendor/codeception/codeception/src/Codeception/Test/Loader.php:109
Stack trace:
#0 /project/vendor/codeception/codeception/src/Codeception/Test/Loader.php(109): array_chunk(Array, 0)
#1 /project/vendor/codeception/codeception/src/Codeception/Test/Loader.php(100): Codeception\Test\Loader->splitTestsIntoChunks(4)
#2 /project/vendor/codeception/codeception/src/Codeception/SuiteManager.php(86): Codeception\Test\Loader->getTests()
#3 /project/vendor/codeception/codeception/src/Codeception/Codecept.php(258): Codeception\SuiteManager->loadTests(NULL)
#4 /project/vendor/codeception/codeception/src/Codeception/Codecept.php(216): Codeception\Codecept->runSuite(Array, 'acceptance', NULL)
#5 /project/vendor/codeception/codeception/src/Codeception/Command/Run.php(646): Codeception\Codecept->run('acceptance')
#6 /project/vendor/codeception/codeception/src/Codeception/Command/Run.php(467): Codeception\Command\Run->runSuites(Array, Array)

@Arhell Arhell requested a review from DavertMik May 25, 2023 00:15
@Naktibalda Naktibalda merged commit 88fcb51 into 5.0 Jun 2, 2023
16 checks passed
@Naktibalda Naktibalda deleted the fix-sharding-empty-file branch June 2, 2023 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants