Skip to content

Commit e2ba60f

Browse files
committed
TCP Test - increase wait time for close
1 parent 04ff879 commit e2ba60f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ public void removeDeadConnection(TcpConnection connection) {
235235
s -> assertThat(s).contains("Connection is closed"));
236236

237237
assertThat(semaphore.tryAcquire(10000, TimeUnit.MILLISECONDS)).isTrue();
238-
assertThat(removed.size() > 0).isTrue();
238+
assertThat(removed).hasSizeGreaterThan(0);
239239
scf.stop();
240240
done.countDown();
241241
}
@@ -287,7 +287,7 @@ public void removeDeadConnection(TcpConnection connection) {
287287
s -> assertThat(s).contains("Connection is closed"));
288288

289289
assertThat(semaphore.tryAcquire(10000, TimeUnit.MILLISECONDS)).isTrue();
290-
assertThat(removed.size() > 0).isTrue();
290+
assertThat(removed).hasSizeGreaterThan(0);
291291
scf.stop();
292292
done.countDown();
293293
}
@@ -339,7 +339,7 @@ public void removeDeadConnection(TcpConnection connection) {
339339
s -> assertThat(s).contains("Connection is closed"));
340340

341341
assertThat(semaphore.tryAcquire(10000, TimeUnit.MILLISECONDS)).isTrue();
342-
assertThat(removed.size() > 0).isTrue();
342+
assertThat(removed).hasSizeGreaterThan(0);
343343
scf.stop();
344344
done.countDown();
345345
}
@@ -447,7 +447,7 @@ public void removeDeadConnection(TcpConnection connection) {
447447
s -> assertThat(s).contains("Connection is closed"));
448448

449449
assertThat(semaphore.tryAcquire(10000, TimeUnit.MILLISECONDS)).isTrue();
450-
assertThat(removed.size() > 0).isTrue();
450+
assertThat(removed).hasSizeGreaterThan(0);
451451
scf.stop();
452452
}
453453

@@ -536,7 +536,7 @@ private void whileOpen(Semaphore semaphore, final List<TcpConnection> added)
536536
assertThat(semaphore.tryAcquire(10000, TimeUnit.MILLISECONDS)).isTrue();
537537
while (added.get(0).isOpen()) {
538538
Thread.sleep(50);
539-
if (n++ > 200) {
539+
if (n++ > 400) {
540540
fail("Failed to close socket");
541541
}
542542
}

0 commit comments

Comments
 (0)