|  |  | @ -133,9 +133,11 @@ class TestUploader(UploaderTestCase): | 
			
		
	
		
		
			
				
					
					|  |  |  |     self.assertTrue(log_handler.upload_order == exp_order, "Files uploaded in wrong order") |  |  |  |     self.assertTrue(log_handler.upload_order == exp_order, "Files uploaded in wrong order") | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   def test_no_upload_with_lock_file(self): |  |  |  |   def test_no_upload_with_lock_file(self): | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     self.start_thread() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     time.sleep(0.25) | 
			
		
	
		
		
			
				
					
					|  |  |  |     f_paths = self.gen_files(lock=True, boot=False) |  |  |  |     f_paths = self.gen_files(lock=True, boot=False) | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     self.start_thread() |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     # allow enough time that files should have been uploaded if they would be uploaded |  |  |  |     # allow enough time that files should have been uploaded if they would be uploaded | 
			
		
	
		
		
			
				
					
					|  |  |  |     time.sleep(5) |  |  |  |     time.sleep(5) | 
			
		
	
		
		
			
				
					
					|  |  |  |     self.join_thread() |  |  |  |     self.join_thread() | 
			
		
	
	
		
		
			
				
					|  |  | @ -144,5 +146,15 @@ class TestUploader(UploaderTestCase): | 
			
		
	
		
		
			
				
					
					|  |  |  |       self.assertFalse(getxattr(f_path, uploader.UPLOAD_ATTR_NAME), "File upload when locked") |  |  |  |       self.assertFalse(getxattr(f_path, uploader.UPLOAD_ATTR_NAME), "File upload when locked") | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   def test_clear_locks_on_startup(self): | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     f_paths = self.gen_files(lock=True, boot=False) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     self.start_thread() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     time.sleep(1) | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     self.join_thread() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     for f_path in f_paths: | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       self.assertFalse(os.path.isfile(f_path + ".lock"), "File lock not cleared on startup") | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | if __name__ == "__main__": |  |  |  | if __name__ == "__main__": | 
			
		
	
		
		
			
				
					
					|  |  |  |   unittest.main(failfast=True) |  |  |  |   unittest.main(failfast=True) | 
			
		
	
	
		
		
			
				
					|  |  | 
 |