INT-3786: Fix Several Sporadic Test Failures
JIRA: https://jira.spring.io/browse/INT-3786 * Increase `receiveTimeout` for several `QueueChannel` and `CountDownLatch` based tests * Fix `FileSplitterTests` for Windows compatibility - `UTF-8` for bytes conversion * Make some STOMP tests as `LongRunning` The next fixing phase
This commit is contained in:
committed by
Gary Russell
parent
3c9b0e4e82
commit
ec12b289c2
@@ -62,7 +62,7 @@ public class MBeanAttributeFilterTests {
|
||||
@Autowired
|
||||
private String domain;
|
||||
|
||||
private final long testTimeout = 1000L;
|
||||
private final long testTimeout = 10000L;
|
||||
|
||||
@Test
|
||||
public void testAttributeFilter() {
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:int="http://www.springframework.org/schema/integration" xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:int="http://www.springframework.org/schema/integration"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<int:channel id="requests" />
|
||||
|
||||
@@ -23,8 +22,12 @@
|
||||
<property name="locateExistingServerIfPossible" value="true" />
|
||||
</bean>
|
||||
|
||||
<int:inbound-channel-adapter id="source" channel="nullChannel" expression="''">
|
||||
<int:inbound-channel-adapter id="source" channel="sourceChannel" expression="''">
|
||||
<int:poller fixed-delay="10" />
|
||||
</int:inbound-channel-adapter>
|
||||
|
||||
<int:channel id="sourceChannel">
|
||||
<int:queue/>
|
||||
</int:channel>
|
||||
|
||||
</beans>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.integration.monitor;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
@@ -33,6 +34,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
/**
|
||||
* @author Dave Syer
|
||||
* @author Gary Russell
|
||||
* @author Artem Bilan
|
||||
* @since 2.0
|
||||
*/
|
||||
@ContextConfiguration
|
||||
@@ -46,6 +48,9 @@ public class ChannelIntegrationTests {
|
||||
@Autowired
|
||||
private PollableChannel intermediate;
|
||||
|
||||
@Autowired
|
||||
private PollableChannel sourceChannel;
|
||||
|
||||
@Autowired
|
||||
private IntegrationMBeanExporter messageChannelsMonitor;
|
||||
|
||||
@@ -85,7 +90,7 @@ public class ChannelIntegrationTests {
|
||||
assertEquals(3, handlerMetrics.getHandleCount());
|
||||
assertEquals(1, handlerMetrics.getErrorCount());
|
||||
|
||||
Thread.sleep(50);
|
||||
assertNotNull(this.sourceChannel.receive(10000));
|
||||
|
||||
assertTrue(messageChannelsMonitor.getSourceMessageCount("source") > 0);
|
||||
assertTrue(messageChannelsMonitor.getSourceMetrics("source").getMessageCount() > 0);
|
||||
|
||||
@@ -16,9 +16,11 @@
|
||||
<int:channel id="input">
|
||||
<int:queue />
|
||||
</int:channel>
|
||||
|
||||
|
||||
<bean id="testTrigger" class="org.springframework.integration.test.util.OnlyOnceTrigger"/>
|
||||
|
||||
<int:bridge input-channel="input" output-channel="next">
|
||||
<int:poller fixed-delay="500" />
|
||||
<int:poller trigger="testTrigger" />
|
||||
</int:bridge>
|
||||
|
||||
<int:service-activator input-channel="next">
|
||||
|
||||
Reference in New Issue
Block a user