View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.test.spring;
8   
9   import org.mule.api.config.ThreadingProfile;
10  import org.mule.tck.junit4.FunctionalTestCase;
11  
12  import org.junit.Test;
13  
14  import static org.junit.Assert.assertEquals;
15  import static org.junit.Assert.assertNotNull;
16  
17  public class DefaultThreadingProfileTestCase extends FunctionalTestCase
18  {
19  
20      @Override
21      protected String getConfigResources()
22      {
23          return "";
24      }
25  
26      @Test
27      public void testDefaultThreadingProfile(){
28          assertNotNull(muleContext.getDefaultThreadingProfile());
29          assertEquals(ThreadingProfile.DEFAULT_MAX_THREADS_ACTIVE, muleContext.getDefaultThreadingProfile().getMaxThreadsActive());
30          assertEquals(ThreadingProfile.DEFAULT_MAX_THREADS_IDLE, muleContext.getDefaultThreadingProfile().getMaxThreadsIdle());
31          assertEquals(ThreadingProfile.DEFAULT_MAX_THREAD_TTL, muleContext.getDefaultThreadingProfile().getThreadTTL());
32          assertEquals(ThreadingProfile.DEFAULT_MAX_BUFFER_SIZE, muleContext.getDefaultThreadingProfile().getMaxBufferSize());
33          assertEquals(ThreadingProfile.DEFAULT_POOL_EXHAUST_ACTION, muleContext.getDefaultThreadingProfile().getPoolExhaustedAction());
34          assertEquals(ThreadingProfile.DEFAULT_THREAD_WAIT_TIMEOUT, muleContext.getDefaultThreadingProfile().getThreadWaitTimeout());
35          assertEquals(ThreadingProfile.DEFAULT_DO_THREADING, muleContext.getDefaultThreadingProfile().isDoThreading());
36      }
37  
38  }