Source:
<code>public void testCustomPartitionCountOverridesDefaultIfLarger() throws Exception { byte[] ratherBigPayload = new byte[2048]; Arrays.fill(ratherBigPayload, (byte) 65); KafkaTestBinder binder = (KafkaTestBinder) getBinder(); DirectChannel moduleOutputChannel = new DirectChannel(); QueueChannel moduleInputChannel = new QueueChannel(); Properties producerProperties = new Properties(); producerProperties.put(BinderPropertyKeys.MIN_PARTITION_COUNT, "10"); Properties consumerProperties = new Properties(); consumerProperties.put(BinderPropertyKeys.MIN_PARTITION_COUNT, "10"); long uniqueBindingId = System.currentTimeMillis(); Binding<MessageChannel> producerBinding = binder.bindProducer("foo" + uniqueBindingId + ".0", moduleOutputChannel, producerProperties); Binding<MessageChannel> consumerBinding = binder.bindConsumer("foo" + uniqueBindingId + ".0", null, moduleInputChannel, consumerProperties); Message<?> message = org.springframework.integration.support.MessageBuilder.withPayload(ratherBigPayload).build(); binderBindUnbindLatency(); moduleOutputChannel.send(message); <START> Message<?> inbound = moduleInputChannel.receive((int)(2000 * timeoutMultiplier)); <END> assertNotNull(inbound); assertArrayEquals(ratherBigPayload, (byte[]) inbound.getPayload()); Collection<Partition> partitions = binder.getCoreBinder().getConnectionFactory().getPartitions( "foo" + uniqueBindingId + ".0"); assertThat(partitions, hasSize(10)); binder.unbind(producerBinding); binder.unbind(consumerBinding); }</code><technical_language>Yeah, I - I hoping pick a value. of them, criterion values set - in cases 1s bumped for tests I suppose happened fail some point - e.g. Kafka larger values. introduced concept of per-binder test multiplier, start default values - wdyt</technical_language>

Target:
public void testCustomPartitionCountOverridesDefaultIfLarger() throws Exception { byte[] ratherBigPayload = new byte[2048]; Arrays.fill(ratherBigPayload, (byte) 65); KafkaTestBinder binder = (KafkaTestBinder) getBinder(); DirectChannel moduleOutputChannel = new DirectChannel(); QueueChannel moduleInputChannel = new QueueChannel(); Properties producerProperties = new Properties(); producerProperties.put(BinderPropertyKeys.MIN_PARTITION_COUNT, "10"); Properties consumerProperties = new Properties(); consumerProperties.put(BinderPropertyKeys.MIN_PARTITION_COUNT, "10"); long uniqueBindingId = System.currentTimeMillis(); Binding<MessageChannel> producerBinding = binder.bindProducer("foo" + uniqueBindingId + ".0", moduleOutputChannel, producerProperties); Binding<MessageChannel> consumerBinding = binder.bindConsumer("foo" + uniqueBindingId + ".0", null, moduleInputChannel, consumerProperties); Message<?> message = org.springframework.integration.support.MessageBuilder.withPayload(ratherBigPayload).build(); binderBindUnbindLatency(); moduleOutputChannel.send(message); Message<?> inbound = receive(moduleInputChannel); assertNotNull(inbound); assertArrayEquals(ratherBigPayload, (byte[]) inbound.getPayload()); Collection<Partition> partitions = binder.getCoreBinder().getConnectionFactory().getPartitions( "foo" + uniqueBindingId + ".0"); assertThat(partitions, hasSize(10)); binder.unbind(producerBinding); binder.unbind(consumerBinding); }