mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	Fix failure test with ConfigKeyScheduledExecutionWrapperTest (#9103)
This commit is contained in:
		
							parent
							
								
									21af134087
								
							
						
					
					
						commit
						5f73172bcb
					
				| @ -20,6 +20,7 @@ import com.cloud.utils.concurrency.NamedThreadFactory; | |||||||
| import org.junit.Test; | import org.junit.Test; | ||||||
| import org.junit.runner.RunWith; | import org.junit.runner.RunWith; | ||||||
| import org.mockito.Mock; | import org.mockito.Mock; | ||||||
|  | import org.mockito.Mockito; | ||||||
| import org.mockito.junit.MockitoJUnitRunner; | import org.mockito.junit.MockitoJUnitRunner; | ||||||
| 
 | 
 | ||||||
| import java.util.concurrent.Executors; | import java.util.concurrent.Executors; | ||||||
| @ -58,8 +59,8 @@ public class ConfigKeyScheduledExecutionWrapperTest { | |||||||
|     @Test(expected = IllegalArgumentException.class) |     @Test(expected = IllegalArgumentException.class) | ||||||
|     public void invalidConfigKeyTest() { |     public void invalidConfigKeyTest() { | ||||||
|         TestRunnable runnable = new TestRunnable(); |         TestRunnable runnable = new TestRunnable(); | ||||||
|         ConfigKey<String> configKey = new ConfigKey<>(String.class, "test", "test", "test", "test", true, |         ConfigKey<String> configKey = Mockito.mock(ConfigKey.class); | ||||||
|                 ConfigKey.Scope.Global, null, null, null, null, null, ConfigKey.Kind.CSV, null); |         when(configKey.value()).thenReturn("test"); | ||||||
|         ConfigKeyScheduledExecutionWrapper runner = new ConfigKeyScheduledExecutionWrapper(executorService, runnable, configKey, TimeUnit.SECONDS); |         ConfigKeyScheduledExecutionWrapper runner = new ConfigKeyScheduledExecutionWrapper(executorService, runnable, configKey, TimeUnit.SECONDS); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user