com.atlassian.sal.core.executor
Class TestThreadLocalDelegateExecutorService

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.atlassian.sal.core.executor.TestThreadLocalDelegateExecutorService
All Implemented Interfaces:
junit.framework.Test

public class TestThreadLocalDelegateExecutorService
extends junit.framework.TestCase

Test that ThreadLocalDelegateExecutorService correctly wraps callables and runnables passed to it before passing them off to its delegate, by checking the thread-local context in the call or run method. Also, test that the thread-local context doesn't get set to something else on return.


Constructor Summary
TestThreadLocalDelegateExecutorService()
           
 
Method Summary
 void testExecute()
           
 void testInvokeAll()
           
 void testInvokeAllWithTimeout()
           
 void testInvokeAny()
           
 void testInvokeAnyWithTimeout()
           
 void testSubmitCallable()
           
 void testSubmitRunnable()
           
 void testSubmitRunnableWithResult()
           
 
Methods inherited from class junit.framework.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestThreadLocalDelegateExecutorService

public TestThreadLocalDelegateExecutorService()
Method Detail

testSubmitCallable

public void testSubmitCallable()
                        throws ExecutionException,
                               InterruptedException
Throws:
ExecutionException
InterruptedException

testSubmitRunnableWithResult

public void testSubmitRunnableWithResult()
                                  throws ExecutionException,
                                         InterruptedException
Throws:
ExecutionException
InterruptedException

testSubmitRunnable

public void testSubmitRunnable()
                        throws ExecutionException,
                               InterruptedException
Throws:
ExecutionException
InterruptedException

testInvokeAll

public void testInvokeAll()
                   throws ExecutionException,
                          InterruptedException
Throws:
ExecutionException
InterruptedException

testInvokeAllWithTimeout

public void testInvokeAllWithTimeout()
                              throws ExecutionException,
                                     InterruptedException
Throws:
ExecutionException
InterruptedException

testInvokeAny

public void testInvokeAny()
                   throws ExecutionException,
                          InterruptedException
Throws:
ExecutionException
InterruptedException

testInvokeAnyWithTimeout

public void testInvokeAnyWithTimeout()
                              throws ExecutionException,
                                     InterruptedException,
                                     TimeoutException
Throws:
ExecutionException
InterruptedException
TimeoutException

testExecute

public void testExecute()
                 throws Exception
Throws:
Exception


Copyright © 2015 Atlassian. All rights reserved.