From 55e77520794cb925c8cd47aa27c47df5fc23ca62 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Mon, 13 Mar 2017 11:38:44 -0400 Subject: [PATCH] Fix sporadic TcpNioConnectionReadTests failure https://build.spring.io/browse/INT-FATS5IC-112/ --- .../ip/tcp/connection/TcpNioConnectionReadTests.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/TcpNioConnectionReadTests.java b/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/TcpNioConnectionReadTests.java index f7299d5dc5..26e8d8c7b0 100644 --- a/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/TcpNioConnectionReadTests.java +++ b/spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/TcpNioConnectionReadTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,6 +47,7 @@ import org.springframework.messaging.support.ErrorMessage; /** * @author Gary Russell * @author Artem Bilan + * * @since 2.0 */ public class TcpNioConnectionReadTests { @@ -228,7 +229,8 @@ public class TcpNioConnectionReadTests { assertTrue(errorMessageLetch.await(10, TimeUnit.SECONDS)); assertThat(errorMessageRef.get().getMessage(), - containsString("Message length 2147483647 exceeds max message length: 2048")); + anyOf(containsString("Message length 2147483647 exceeds max message length: 2048"), + containsString("Connection is closed"))); assertTrue(semaphore.tryAcquire(10000, TimeUnit.MILLISECONDS)); assertTrue(removed.size() > 0);