Skip to content

Commit 55e7752

Browse files
committed
Fix sporadic TcpNioConnectionReadTests failure
https://build.spring.io/browse/INT-FATS5IC-112/
1 parent ab8f3c8 commit 55e7752

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/TcpNioConnectionReadTests.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -47,6 +47,7 @@
4747
/**
4848
* @author Gary Russell
4949
* @author Artem Bilan
50+
*
5051
* @since 2.0
5152
*/
5253
public class TcpNioConnectionReadTests {
@@ -228,7 +229,8 @@ public void removeDeadConnection(TcpConnection connection) {
228229
assertTrue(errorMessageLetch.await(10, TimeUnit.SECONDS));
229230

230231
assertThat(errorMessageRef.get().getMessage(),
231-
containsString("Message length 2147483647 exceeds max message length: 2048"));
232+
anyOf(containsString("Message length 2147483647 exceeds max message length: 2048"),
233+
containsString("Connection is closed")));
232234

233235
assertTrue(semaphore.tryAcquire(10000, TimeUnit.MILLISECONDS));
234236
assertTrue(removed.size() > 0);

0 commit comments

Comments
 (0)