Class ExecutorsTest

java.lang.Object
ubic.gemma.core.util.concurrent.ExecutorsTest

public class ExecutorsTest extends Object
Unit tests for Executors: the in-tree factory that wraps every executor produced for the project with Spring-Security's DelegatingSecurityContextExecutorService plus the log4j ThreadContext propagator. Pins the wrapping contract (so the layered delegation never silently regresses), the JDK 21 virtual-thread reflection path, and the basic functional behaviour (a submitted task actually runs on the returned executor).
Author:
claude
  • Constructor Details

    • ExecutorsTest

      public ExecutorsTest()
  • Method Details

    • newSingleThreadExecutor_returnsSecurityContextWrappedExecutor

      @Test public void newSingleThreadExecutor_returnsSecurityContextWrappedExecutor() throws Exception
      Throws:
      Exception
    • newSingleThreadExecutor_withThreadFactory_consultsTheFactory

      @Test public void newSingleThreadExecutor_withThreadFactory_consultsTheFactory() throws Exception
      Throws:
      Exception
    • newFixedThreadPool_returnsSecurityContextWrappedExecutor

      @Test public void newFixedThreadPool_returnsSecurityContextWrappedExecutor() throws Exception
      Throws:
      Exception
    • newFixedThreadPool_withThreadFactory_returnsWrappedExecutor

      @Test public void newFixedThreadPool_withThreadFactory_returnsWrappedExecutor() throws Exception
      Throws:
      Exception
    • newCachedThreadPool_returnsSecurityContextWrappedExecutor

      @Test public void newCachedThreadPool_returnsSecurityContextWrappedExecutor() throws Exception
      Throws:
      Exception
    • newSingleThreadScheduledExecutor_returnsSecurityContextWrappedExecutor

      @Test public void newSingleThreadScheduledExecutor_returnsSecurityContextWrappedExecutor() throws Exception
      Throws:
      Exception
    • newVirtualThreadPerTaskExecutorIfAvailable_returnsWrappedExecutor

      @Test public void newVirtualThreadPerTaskExecutorIfAvailable_returnsWrappedExecutor() throws Exception
      Throws:
      Exception