From 91e41ae66e350492b195376865fac0d6e06c3165 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Wed, 12 May 2021 14:39:50 +0200 Subject: [PATCH] Cleanup test classes Motivation: We had some println left in the test-classes. Modifications: Remove println usage Result: Cleanup --- .../java/io/netty/buffer/AdvancedLeakAwareByteBufTest.java | 1 - .../resolver/dns/DnsNameResolverClientSubnetTest.java | 2 +- .../java/io/netty/resolver/dns/DnsNameResolverTest.java | 7 ++----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/buffer/src/test/java/io/netty/buffer/AdvancedLeakAwareByteBufTest.java b/buffer/src/test/java/io/netty/buffer/AdvancedLeakAwareByteBufTest.java index 3e53729d83..9c828e4d86 100644 --- a/buffer/src/test/java/io/netty/buffer/AdvancedLeakAwareByteBufTest.java +++ b/buffer/src/test/java/io/netty/buffer/AdvancedLeakAwareByteBufTest.java @@ -46,7 +46,6 @@ public class AdvancedLeakAwareByteBufTest extends SimpleLeakAwareByteBufTest { composite.addComponent(true, leakAwareBuf); byte[] result = new byte[5]; ByteBuf bb = composite.component(0); - System.out.println(bb); bb.readBytes(result); assertArrayEquals("world".getBytes(CharsetUtil.US_ASCII), result); composite.release(); diff --git a/resolver-dns/src/test/java/io/netty/resolver/dns/DnsNameResolverClientSubnetTest.java b/resolver-dns/src/test/java/io/netty/resolver/dns/DnsNameResolverClientSubnetTest.java index 5e06a1503f..34874b97a7 100644 --- a/resolver-dns/src/test/java/io/netty/resolver/dns/DnsNameResolverClientSubnetTest.java +++ b/resolver-dns/src/test/java/io/netty/resolver/dns/DnsNameResolverClientSubnetTest.java @@ -49,7 +49,7 @@ public class DnsNameResolverClientSubnetTest { new DefaultDnsOptEcsRecord(1024, 24, SocketUtils.addressByName("157.88.0.0").getAddress()))); for (InetAddress address: future.syncUninterruptibly().getNow()) { - System.err.println(address); + System.out.println(address); } } finally { resolver.close(); diff --git a/resolver-dns/src/test/java/io/netty/resolver/dns/DnsNameResolverTest.java b/resolver-dns/src/test/java/io/netty/resolver/dns/DnsNameResolverTest.java index 9b123d766b..75cd96ed96 100644 --- a/resolver-dns/src/test/java/io/netty/resolver/dns/DnsNameResolverTest.java +++ b/resolver-dns/src/test/java/io/netty/resolver/dns/DnsNameResolverTest.java @@ -497,11 +497,8 @@ public class DnsNameResolverTest { for (Entry e : resultA.entrySet()) { InetAddress expected = e.getValue(); InetAddress actual = resultB.get(e.getKey()); - if (!actual.equals(expected)) { - // Print the content of the cache when test failure is expected. - System.err.println("Cache for " + e.getKey() + ": " + resolver.resolveAll(e.getKey()).getNow()); - } - assertThat(actual, is(expected)); + assertThat("Cache for " + e.getKey() + ": " + resolver.resolveAll(e.getKey()).getNow(), + actual, is(expected)); } } finally { resolver.close();