381c266443
#19316 fix MysqlMutex long name ( #19614 )
...
Co-authored-by: Márton Somogyi <somogyi.marton@metrisoft.hu>
2022-10-09 20:21:09 +02:00
0b4741ea6a
MysqlMutext component fix same connection but difference database fail ( #19603 )
...
* MysqlMutext component fix same connection but difference database fail with extended keyPrefix.
* @since added to MysqlMutex#keyPrefix
Co-authored-by: Márton Somogyi <somogyi.marton@metrisoft.hu>
2022-10-06 09:06:59 +02:00
161526cd41
HTTPS everywhere ( #19503 )
2022-08-03 12:32:18 +03:00
6aa0ac1ed0
Fix #18151 : Added Mutex::isAcquired()
to check if lock is currently acquired
2020-07-04 00:05:00 +03:00
ce0c7ad096
Fix #17533 : Fix mutex testRetryAcquire() on Windows ( #17591 )
...
Skip Windows tests for retry delay
https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-sleep
> If dwMilliseconds is less than the resolution of the system clock, the thread may sleep for less
> than the specified length of time.
2019-10-03 13:53:35 +03:00
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.
2019-01-08 09:55:27 -05:00
1fe3d61a3b
Fixes #16838 : yii\mutex\Mutex::acquire()
no longer returns true
if lock is already acquired by the same component in the same process
2018-11-05 00:23:23 +03:00
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()`
2018-11-01 01:19:33 +03:00
c92eb7761d
Fixes #16836 : Fix yii\mutex\MysqlMutex
to handle locks with names longer than 64 character
2018-10-27 20:19:17 +03:00
d599568154
Merge branch 'master' into kidol-filemutex
...
Conflicts:
framework/mutex/FileMutex.php
2017-09-13 22:05:40 +03:00
5a8c3d537b
Enable phpdoc_summary
rule in php-cs-fixer config ( #14675 )
...
* Enable `phpdoc_summary` rule in php-cs-fixer config.
* Fix case in "PHPDoc".
2017-08-21 11:19:35 +02:00
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.
2017-06-12 12:25:45 +03:00
31e321b9b2
Remove unused imports. ( #14096 )
2017-05-01 20:26:15 +02:00
ff4cde18d4
Merge branch 'master' into feature/docker-testing
2017-03-06 15:50:56 +01:00
323568c2e9
Remove trailing spaces from sources and tests ( #13621 ) [skip ci]
2017-02-19 17:34:22 +03:00
9f95f71572
added groups to tests
2017-02-16 16:46:10 +01:00
3ea5b97585
Fix existing test
2016-12-21 19:37:43 +01:00
60208bb96c
Enabled tests for FileMutex on Windows, see #12824 ( #12831 )
2016-10-25 13:37:55 +03:00
9d882e53fe
Fixes #12431 : Fix bug when lock file was not removed after yii\mutex\FileMutex::release()
2016-09-01 23:50:05 +03:00
8d6b669bc6
Added more tests for mutex; ( #11359 )
2016-04-16 12:59:33 +03:00
db1a96d876
Added tests for #8920 , used 16bit integers to avoid out of range error
2016-04-05 00:57:52 +03:00