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.config;
8   
9   import org.mule.api.config.ThreadingProfile;
10  import org.mule.tck.junit4.AbstractMuleContextTestCase;
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 AbstractMuleContextTestCase
18  {
19  
20      @Test
21      public void testDefaultThreadingProfile()
22      {
23          assertNotNull(muleContext.getDefaultThreadingProfile());
24          assertEquals(ThreadingProfile.DEFAULT_MAX_THREADS_ACTIVE, muleContext.getDefaultThreadingProfile()
25              .getMaxThreadsActive());
26          assertEquals(ThreadingProfile.DEFAULT_MAX_THREADS_IDLE, muleContext.getDefaultThreadingProfile()
27              .getMaxThreadsIdle());
28          assertEquals(ThreadingProfile.DEFAULT_MAX_THREAD_TTL, muleContext.getDefaultThreadingProfile()
29              .getThreadTTL());
30          assertEquals(ThreadingProfile.DEFAULT_MAX_BUFFER_SIZE, muleContext.getDefaultThreadingProfile()
31              .getMaxBufferSize());
32          assertEquals(ThreadingProfile.DEFAULT_POOL_EXHAUST_ACTION, muleContext.getDefaultThreadingProfile()
33              .getPoolExhaustedAction());
34          assertEquals(ThreadingProfile.DEFAULT_THREAD_WAIT_TIMEOUT, muleContext.getDefaultThreadingProfile()
35              .getThreadWaitTimeout());
36          assertEquals(ThreadingProfile.DEFAULT_DO_THREADING, muleContext.getDefaultThreadingProfile()
37              .isDoThreading());
38      }
39  
40  }