mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-11-01 03:26:36 +08:00 
			
		
		
		
	 e5ecea653f
			
		
	
	e5ecea653f
	
	
	
		
			
			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.