1 /* 2 * $Id: StreamingCapacityTestCase.java 22450 2011-07-19 08:20:41Z dirk.olmes $ 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.tck.junit4.rule.DynamicPort; 14 15 import java.util.Arrays; 16 import java.util.Collection; 17 18 import org.junit.Rule; 19 import org.junit.runners.Parameterized.Parameters; 20 21 /** 22 * This will happily send 1GB while running in significantly less memory, but it takes some time. 23 * Since I'd like this to run in CI I will set at 100MB and test memory delta. But since memory usage 24 * could be around that anyway, this is may be a little unreliable. And there's no way to 25 * measure memory use directly in 1.4. We'll see... 26 * 27 * IMPORTANT - DO NOT RUN THIS TEST IN AN IDE WITH LOG LEVEL OF DEBUG. USE INFO TO SEE 28 * DIAGNOSTICS. OTHERWISE THE CONSOLE OUTPUT WILL BE SIMILAR SIZE TO DATA TRANSFERRED, 29 * CAUSING CONFUSNG AND PROBABLY FATAL MEMORY USE. 30 */ 31 public class StreamingCapacityTestCase extends AbstractStreamingCapacityTestCase 32 { 33 @Rule 34 public DynamicPort port1 = new DynamicPort("port1"); 35 36 @Rule 37 public DynamicPort port2 = new DynamicPort("port2"); 38 39 @Parameters 40 public static Collection<Object[]> parameters() 41 { 42 return Arrays.asList(new Object[][]{ 43 {ConfigVariant.SERVICE, "tcp-streaming-test-service.xml", 10 * ONE_GB}, 44 {ConfigVariant.FLOW, "tcp-streaming-test-flow.xml", 10 * ONE_GB}}); 45 } 46 47 public StreamingCapacityTestCase(ConfigVariant variant, String configResources, long size) 48 { 49 super(variant, configResources, size); 50 } 51 } 52