From d6e2c06714730b9d5d2dd827b1ecb3182e0635da Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Fri, 28 Jul 2017 11:09:20 +0200 Subject: [PATCH] Fix expected bytes in tests due to new major version In 6.x we had to serialize the 2 byte marker for the transport address type for BWC. Now in 6.x this doesn't exist and we write 2 bytes less when we serialize a transport address to a min compat node. Closes #25893 --- .../transport/AbstractSimpleTransportTestCase.java | 2 +- .../org/elasticsearch/transport/MockTcpTransportTests.java | 6 ------ .../transport/nio/SimpleNioTransportTests.java | 6 ------ 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/test/framework/src/main/java/org/elasticsearch/transport/AbstractSimpleTransportTestCase.java b/test/framework/src/main/java/org/elasticsearch/transport/AbstractSimpleTransportTestCase.java index 70cd9849a55c0..2e252d112df2b 100644 --- a/test/framework/src/main/java/org/elasticsearch/transport/AbstractSimpleTransportTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/transport/AbstractSimpleTransportTestCase.java @@ -2422,7 +2422,7 @@ public String executor() { int addressLen = serviceB.boundAddress().publishAddress().address().getAddress().getAddress().length; // if we are bound to a IPv6 address the response address is serialized with the exception so it will be different depending // on the stack. The emphemeral port will always be in the same range - assertEquals(185 + addressLen, stats.getRxSize().getBytes()); + assertEquals(183 + addressLen, stats.getRxSize().getBytes()); assertEquals(91, stats.getTxSize().getBytes()); } finally { serviceC.close(); diff --git a/test/framework/src/test/java/org/elasticsearch/transport/MockTcpTransportTests.java b/test/framework/src/test/java/org/elasticsearch/transport/MockTcpTransportTests.java index f610770a97a05..b32680d9da466 100644 --- a/test/framework/src/test/java/org/elasticsearch/transport/MockTcpTransportTests.java +++ b/test/framework/src/test/java/org/elasticsearch/transport/MockTcpTransportTests.java @@ -53,10 +53,4 @@ protected Version executeHandshake(DiscoveryNode node, MockChannel mockChannel, mockTransportService.start(); return mockTransportService; } - - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/25893") - @Override - public void testTransportStatsWithException() throws Exception { - super.testTransportStatsWithException(); - } } diff --git a/test/framework/src/test/java/org/elasticsearch/transport/nio/SimpleNioTransportTests.java b/test/framework/src/test/java/org/elasticsearch/transport/nio/SimpleNioTransportTests.java index 57fb57d753b0f..2ba2e4cc02a85 100644 --- a/test/framework/src/test/java/org/elasticsearch/transport/nio/SimpleNioTransportTests.java +++ b/test/framework/src/test/java/org/elasticsearch/transport/nio/SimpleNioTransportTests.java @@ -130,10 +130,4 @@ public void testBindUnavailableAddress() { }); assertEquals("Failed to bind to ["+ port + "]", bindTransportException.getMessage()); } - - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/25893") - @Override - public void testTransportStatsWithException() throws Exception { - super.testTransportStatsWithException(); - } }