Pavel Ivanov
e5ecea653f
Fixed random fails of RetryAcquireTraitTest ( #17024 )
...
Property `RetryAcquireTrait::$retryDelay` sets the minimum delay, but not the exact delay. In fact, the delay may be longer. Because of this, sometimes less than 20 blocking attempts occur. Checking the exact number of locks sometimes leads to the following errors:
```
$ vendor/bin/phpunit --filter=testRetryAcquire
PHPUnit 4.8.34 by Sebastian Bergmann and contributors.
F
You should really fix these slow tests (>500ms)...
1. 1050ms to run yiiunit\framework\mutex\RetryAcquireTraitTest:testRetryAcquire
Time: 4.08 seconds, Memory: 44.00MB
There was 1 failure:
1) yiiunit\framework\mutex\RetryAcquireTraitTest::testRetryAcquire
Failed asserting that 19 is identical to 20.
/yii2/tests/framework/mutex/RetryAcquireTraitTest.php:36
/yii2/vendor/phpunit/phpunit/phpunit:52
FAILURES!
Tests: 1, Assertions: 3, Failures: 1.
```
I reworked the test so that it checks the duration of the delays, but not the exact number of blocking attempts.
6 years ago
cuileon
489dd119a5
merge from yiisoft/yii2
6 years ago
Robert Korulczyk
1fe3d61a3b
Fixes #16838 : `yii\mutex\Mutex::acquire()` no longer returns `true` if lock is already acquired by the same component in the same process
6 years ago
Robert Korulczyk
91c96ff452
Fixes #16839
...
- Increase frequency of lock tries for `yii\mutex\FileMutex::acquireLock()` when $timeout is provided (rob006)
- Add support for `$timeout` in `yii\mutex\PgsqlMutex::acquire()`
6 years ago
Robert Korulczyk
c92eb7761d
Fixes #16836 : Fix `yii\mutex\MysqlMutex` to handle locks with names longer than 64 character
6 years ago
Robert Korulczyk
5a8c3d537b
Enable `phpdoc_summary` rule in php-cs-fixer config ( #14675 )
...
* Enable `phpdoc_summary` rule in php-cs-fixer config.
* Fix case in "PHPDoc".
7 years ago
Robert Korulczyk
ba0ab403b5
Added php-cs-fixer coding standards validation to Travis CI ( #14100 )
...
* php-cs-fixer: PSR2 rule.
* php-cs-fixer: PSR2 rule - fix views.
* Travis setup refactoring.
* Add php-cs-fixer to travis cs tests.
* Fix tests on hhvm-3.12
* improve travis config
* composer update
* revert composer update
* improve travis config
* Fix CS.
* Extract config to separate classes.
* Extract config to separate classes.
* Add file header.
* Force short array syntax.
* binary_operator_spaces fixer
* Fix broken tests
* cast_spaces fixer
* concat_space fixer
* dir_constant fixer
* ereg_to_preg fixer
* function_typehint_space fixer
* hash_to_slash_comment fixer
* is_null fixer
* linebreak_after_opening_tag fixer
* lowercase_cast fixer
* magic_constant_casing fixer
* modernize_types_casting fixer
* native_function_casing fixer
* new_with_braces fixer
* no_alias_functions fixer
* no_blank_lines_after_class_opening fixer
* no_blank_lines_after_phpdoc fixer
* no_empty_comment fixer
* no_empty_phpdoc fixer
* no_empty_statement fixer
* no_extra_consecutive_blank_lines fixer
* no_leading_import_slash fixer
* no_leading_namespace_whitespace fixer
* no_mixed_echo_print fixer
* no_multiline_whitespace_around_double_arrow fixer
* no_multiline_whitespace_before_semicolons fixer
* no_php4_constructor fixer
* no_short_bool_cast fixer
* no_singleline_whitespace_before_semicolons fixer
* no_spaces_around_offset fixer
* no_trailing_comma_in_list_call fixer
* no_trailing_comma_in_singleline_array fixer
* no_unneeded_control_parentheses fixer
* no_unused_imports fixer
* no_useless_return fixer
* no_whitespace_before_comma_in_array fixer
* no_whitespace_in_blank_line fixer
* not_operator_with_successor_space fixer
* object_operator_without_whitespace fixer
* ordered_imports fixer
* php_unit_construct fixer
* php_unit_dedicate_assert fixer
* php_unit_fqcn_annotation fixer
* phpdoc_indent fixer
* phpdoc_no_access fixer
* phpdoc_no_empty_return fixer
* phpdoc_no_package fixer
* phpdoc_no_useless_inheritdoc fixer
* Fix broken tests
* phpdoc_return_self_reference fixer
* phpdoc_single_line_var_spacing fixer
* phpdoc_single_line_var_spacing fixer
* phpdoc_to_comment fixer
* phpdoc_trim fixer
* phpdoc_var_without_name fixer
* psr4 fixer
* self_accessor fixer
* short_scalar_cast fixer
* single_blank_line_before_namespace fixer
* single_quote fixer
* standardize_not_equals fixer
* ternary_operator_spaces fixer
* trailing_comma_in_multiline_array fixer
* trim_array_spaces fixer
* protected_to_private fixer
* unary_operator_spaces fixer
* whitespace_after_comma_in_array fixer
* `parent::setRules()` -> `$this->setRules()`
* blank_line_after_opening_tag fixer
* Update finder config.
* Revert changes for YiiRequirementChecker.
* Fix array formatting.
* Add missing import.
* Fix CS for new code merged from master.
* Fix some indentation issues.
7 years ago
Robert Korulczyk
31e321b9b2
Remove unused imports. ( #14096 )
8 years ago
Nikolay Oleynikov
323568c2e9
Remove trailing spaces from sources and tests ( #13621 ) [skip ci]
8 years ago
Tobias Munk
9f95f71572
added groups to tests
8 years ago
kidol
3ea5b97585
Fix existing test
8 years ago
Edgard Lorraine Messias
60208bb96c
Enabled tests for FileMutex on Windows, see #12824 ( #12831 )
8 years ago
Robert Korulczyk
9d882e53fe
Fixes #12431 : Fix bug when lock file was not removed after `yii\mutex\FileMutex::release()`
8 years ago
Edgard Lorraine Messias
8d6b669bc6
Added more tests for mutex; ( #11359 )
9 years ago
Yaroslav Lukyanov
db1a96d876
Added tests for #8920 , used 16bit integers to avoid out of range error
9 years ago