testUnknownMessagePayload() — netty Function Reference
Architecture documentation for the testUnknownMessagePayload() function in MqttCodecTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 5afe9c7f_719c_3e67_11d0_7766b46f9ba3["testUnknownMessagePayload()"] f4aba1d9_6b30_ec96_9eaa_4c5557b5796d["MqttCodecTest"] 5afe9c7f_719c_3e67_11d0_7766b46f9ba3 -->|defined in| f4aba1d9_6b30_ec96_9eaa_4c5557b5796d 25a0f3b3_7f7d_acef_16ff_03dee5be358c["validateFixedHeaders()"] 5afe9c7f_719c_3e67_11d0_7766b46f9ba3 -->|calls| 25a0f3b3_7f7d_acef_16ff_03dee5be358c 7f1f132f_5c76_eeee_4373_e19ed22ed363["validatePubReplyVariableHeader()"] 5afe9c7f_719c_3e67_11d0_7766b46f9ba3 -->|calls| 7f1f132f_5c76_eeee_4373_e19ed22ed363 style 5afe9c7f_719c_3e67_11d0_7766b46f9ba3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-mqtt/src/test/java/io/netty/handler/codec/mqtt/MqttCodecTest.java lines 860–882
@Test
void testUnknownMessagePayload() throws Exception {
MqttMessage message = createPubAckMessage(PubAck.SUCCESS.byteValue(), null);
ByteBuf byteBuf = MqttEncoder.doEncode(ctx, message);
byteBuf.writeBytes("whatever".getBytes(CharsetUtil.UTF_8));
mqttDecoder.channelRead(ctx, byteBuf);
assertEquals(2, out.size());
final MqttMessage decodedMessage = (MqttMessage) out.get(0);
validateFixedHeaders(message.fixedHeader(), decodedMessage.fixedHeader());
validatePubReplyVariableHeader((MqttPubReplyMessageVariableHeader) message.variableHeader(),
(MqttPubReplyMessageVariableHeader) decodedMessage.variableHeader());
assertNull(decodedMessage.payload());
final MqttMessage failedMessage = (MqttMessage) out.get(1);
assertNull(failedMessage.fixedHeader());
assertNull(failedMessage.variableHeader());
assertNull(failedMessage.payload());
assertTrue(failedMessage.decoderResult().isFailure());
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testUnknownMessagePayload() do?
testUnknownMessagePayload() is a function in the netty codebase, defined in codec-mqtt/src/test/java/io/netty/handler/codec/mqtt/MqttCodecTest.java.
Where is testUnknownMessagePayload() defined?
testUnknownMessagePayload() is defined in codec-mqtt/src/test/java/io/netty/handler/codec/mqtt/MqttCodecTest.java at line 860.
What does testUnknownMessagePayload() call?
testUnknownMessagePayload() calls 2 function(s): validateFixedHeaders, validatePubReplyVariableHeader.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free