From a9fe46711e4a8d7d9251efc42eb09c90577f8baf Mon Sep 17 00:00:00 2001 From: Violeta Georgieva Date: Tue, 4 Apr 2023 16:55:49 +0300 Subject: [PATCH] [test] Make it obvious that the test fails with UnsupportedMessageTypeException (#2763) Related to #2754 --- .../src/test/java/reactor/netty/NettyOutboundTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/reactor-netty-core/src/test/java/reactor/netty/NettyOutboundTest.java b/reactor-netty-core/src/test/java/reactor/netty/NettyOutboundTest.java index 16e0858615..3926d5717e 100644 --- a/reactor-netty-core/src/test/java/reactor/netty/NettyOutboundTest.java +++ b/reactor-netty-core/src/test/java/reactor/netty/NettyOutboundTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2021 VMware, Inc. or its affiliates, All Rights Reserved. + * Copyright (c) 2017-2023 VMware, Inc. or its affiliates, All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,6 +41,7 @@ import io.netty.channel.FileRegion; import io.netty.channel.embedded.EmbeddedChannel; import io.netty.handler.codec.MessageToMessageEncoder; +import io.netty.handler.codec.UnsupportedMessageTypeException; import io.netty.handler.ssl.SslContext; import io.netty.handler.ssl.SslContextBuilder; import io.netty.handler.ssl.SslHandler; @@ -244,6 +245,8 @@ public NettyOutbound withConnection(Consumer withConnection) .endsWith("End of File"); assertThat(f.isSuccess()).isFalse(); + assertThat(f.cause()).isNotNull() + .isInstanceOf(UnsupportedMessageTypeException.class); assertThat(channel.finishAndReleaseAll()).isTrue(); }