Browse Source
			
			
			Fix lockprivider test
			
				Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
			
			
				pull/18064/head
			
			
		 
		
			
				
					
						
						Roeland Jago Douma
					
					6 years ago
					
				 
				
			 
		 
		
			
				
				  
				  No known key found for this signature in database
				  
				  	
						GPG Key ID: F941078878347C0C
				  	
				  
				
			
		
		
		
	
		
			
				 1 changed files with 
8 additions and 
2 deletions
			 
			
		 
		
			
				- 
					
					
					 
					tests/lib/Lock/LockingProvider.php
				
 
			
		
		
			
				
					
					
						
							
								
									
										
											
	
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -175,7 +175,10 @@ abstract class LockingProvider extends TestCase { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						public function testLockedExceptionHasPathForShared() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							try { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								$this->testSharedLockAfterExclusive(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								$this->instance->acquireLock('foo', ILockingProvider::LOCK_EXCLUSIVE); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								$this->assertTrue($this->instance->isLocked('foo', ILockingProvider::LOCK_EXCLUSIVE)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								$this->instance->acquireLock('foo', ILockingProvider::LOCK_SHARED); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								$this->fail('Expected locked exception'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} catch (LockedException $e) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								$this->assertEquals('foo', $e->getPath()); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -184,7 +187,10 @@ abstract class LockingProvider extends TestCase { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						public function testLockedExceptionHasPathForExclusive() { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							try { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								$this->testExclusiveLockAfterShared(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								$this->instance->acquireLock('foo', ILockingProvider::LOCK_EXCLUSIVE); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								$this->assertTrue($this->instance->isLocked('foo', ILockingProvider::LOCK_EXCLUSIVE)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								$this->instance->acquireLock('foo', ILockingProvider::LOCK_SHARED); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								$this->fail('Expected locked exception'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} catch (LockedException $e) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								$this->assertEquals('foo', $e->getPath()); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |