View Javadoc

1   /*
2    * $Id: StreamingSynchCapacityTestCase.java 20321 2010-11-24 15:21:24Z dfeist $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.transport.tcp.integration;
12  
13  import org.mule.util.SystemUtils;
14  
15  /**
16   * Tests a model for which synchonous=true for environment (was "and connector", but that is
17   * no longer possible).
18   * 
19   * Not the same as issue MULE-1687.
20   *
21   * This will happily send 1GB while running in significantly less memory, but it takes some time.
22   * Since I'd like this to run in CI I will set at 100MB and test memory delta.  But since memory usage
23   * could be around that anyway, this is may be a little unreliable.  And there's no way to
24   * measure memory use directly in 1.4.  We'll see...
25   *
26   * IMPORTANT - DO NOT RUN THIS TEST IN AN IDE WITH LOG LEVEL OF DEBUG.  USE INFO TO SEE
27   * DIAGNOSTICS.  OTHERWISE THE CONSOLE OUTPUT WILL BE SIMILAR SIZE TO DATA TRANSFERRED,
28   * CAUSING CONFUSNG AND PROBABLY FATAL MEMORY USE.
29   */
30  public class StreamingSynchCapacityTestCase extends AbstractStreamingCapacityTestCase
31  {
32      @Override
33      protected boolean isDisabledInThisEnvironment()
34      {
35          // MULE-4713
36          return (SystemUtils.isIbmJDK() && SystemUtils.isJavaVersionAtLeast(160));
37      }
38  
39      public StreamingSynchCapacityTestCase()
40      {
41      	super(100 * ONE_MB);
42      }
43  
44      protected String getConfigResources()
45      {
46          return "tcp-streaming2-test.xml";
47      }
48  
49      @Override
50      protected int getNumPortsToFind()
51      {
52          return 2;
53      }
54  }