File tree Expand file tree Collapse file tree 1 file changed +11
-26
lines changed
server/src/test/java/org/elasticsearch/transport Expand file tree Collapse file tree 1 file changed +11
-26
lines changed Original file line number Diff line number Diff line change @@ -56,32 +56,17 @@ public void testDecode() throws IOException {
5656 }
5757
5858 try (RecyclerBytesStreamOutput os = new RecyclerBytesStreamOutput (recycler )) {
59- final BytesReference totalBytes ;
60- if (isRequest ) {
61- totalBytes = OutboundHandler .serialize (
62- isRequest ? OutboundHandler .MessageDirection .REQUEST : OutboundHandler .MessageDirection .RESPONSE ,
63- action ,
64- requestId ,
65- false ,
66- TransportVersion .current (),
67- null ,
68- new TestRequest (randomAlphaOfLength (100 )),
69- threadContext ,
70- os
71- );
72- } else {
73- totalBytes = OutboundHandler .serialize (
74- isRequest ? OutboundHandler .MessageDirection .REQUEST : OutboundHandler .MessageDirection .RESPONSE ,
75- action ,
76- requestId ,
77- false ,
78- TransportVersion .current (),
79- null ,
80- new TestResponse (randomAlphaOfLength (100 )),
81- threadContext ,
82- os
83- );
84- }
59+ final BytesReference totalBytes = OutboundHandler .serialize (
60+ isRequest ? OutboundHandler .MessageDirection .REQUEST : OutboundHandler .MessageDirection .RESPONSE ,
61+ action ,
62+ requestId ,
63+ false ,
64+ TransportVersion .current (),
65+ null ,
66+ isRequest ? new TestRequest (randomAlphaOfLength (100 )) : new TestResponse (randomAlphaOfLength (100 )),
67+ threadContext ,
68+ os
69+ );
8570 int totalHeaderSize = TcpHeader .HEADER_SIZE + totalBytes .getInt (TcpHeader .VARIABLE_HEADER_SIZE_POSITION );
8671 final BytesReference messageBytes = totalBytes .slice (totalHeaderSize , totalBytes .length () - totalHeaderSize );
8772
You can’t perform that action at this time.
0 commit comments