@@ -88,7 +88,7 @@ public class MessageDeframerTest {
8888 "service/method" , statsCtxFactory , GrpcUtil .STOPWATCH_SUPPLIER );
8989
9090 private MessageDeframer deframer = new MessageDeframer (listener , Codec .Identity .NONE ,
91- DEFAULT_MAX_MESSAGE_SIZE , statsTraceCtx );
91+ DEFAULT_MAX_MESSAGE_SIZE , statsTraceCtx , "test" );
9292
9393 private ArgumentCaptor <InputStream > messages = ArgumentCaptor .forClass (InputStream .class );
9494
@@ -208,7 +208,7 @@ public void endOfStreamCallbackShouldWaitForMessageDelivery() {
208208 @ Test
209209 public void compressed () {
210210 deframer = new MessageDeframer (listener , new Codec .Gzip (), DEFAULT_MAX_MESSAGE_SIZE ,
211- statsTraceCtx );
211+ statsTraceCtx , "test" );
212212 deframer .request (1 );
213213
214214 byte [] payload = compress (new byte [1000 ]);
@@ -246,7 +246,7 @@ public Void answer(InvocationOnMock invocation) throws Throwable {
246246 public void sizeEnforcingInputStream_readByteBelowLimit () throws IOException {
247247 ByteArrayInputStream in = new ByteArrayInputStream ("foo" .getBytes (Charsets .UTF_8 ));
248248 SizeEnforcingInputStream stream =
249- new MessageDeframer .SizeEnforcingInputStream (in , 4 , statsTraceCtx );
249+ new MessageDeframer .SizeEnforcingInputStream (in , 4 , statsTraceCtx , "test" );
250250
251251 while (stream .read () != -1 ) {}
252252
@@ -259,7 +259,7 @@ public void sizeEnforcingInputStream_readByteBelowLimit() throws IOException {
259259 public void sizeEnforcingInputStream_readByteAtLimit () throws IOException {
260260 ByteArrayInputStream in = new ByteArrayInputStream ("foo" .getBytes (Charsets .UTF_8 ));
261261 SizeEnforcingInputStream stream =
262- new MessageDeframer .SizeEnforcingInputStream (in , 3 , statsTraceCtx );
262+ new MessageDeframer .SizeEnforcingInputStream (in , 3 , statsTraceCtx , "test" );
263263
264264 while (stream .read () != -1 ) {}
265265
@@ -272,10 +272,10 @@ public void sizeEnforcingInputStream_readByteAtLimit() throws IOException {
272272 public void sizeEnforcingInputStream_readByteAboveLimit () throws IOException {
273273 ByteArrayInputStream in = new ByteArrayInputStream ("foo" .getBytes (Charsets .UTF_8 ));
274274 SizeEnforcingInputStream stream =
275- new MessageDeframer .SizeEnforcingInputStream (in , 2 , statsTraceCtx );
275+ new MessageDeframer .SizeEnforcingInputStream (in , 2 , statsTraceCtx , "test" );
276276
277277 thrown .expect (StatusRuntimeException .class );
278- thrown .expectMessage ("INTERNAL: Compressed frame exceeds" );
278+ thrown .expectMessage ("INTERNAL: test: Compressed frame exceeds" );
279279
280280 while (stream .read () != -1 ) {}
281281
@@ -287,7 +287,7 @@ public void sizeEnforcingInputStream_readByteAboveLimit() throws IOException {
287287 public void sizeEnforcingInputStream_readBelowLimit () throws IOException {
288288 ByteArrayInputStream in = new ByteArrayInputStream ("foo" .getBytes (Charsets .UTF_8 ));
289289 SizeEnforcingInputStream stream =
290- new MessageDeframer .SizeEnforcingInputStream (in , 4 , statsTraceCtx );
290+ new MessageDeframer .SizeEnforcingInputStream (in , 4 , statsTraceCtx , "test" );
291291 byte [] buf = new byte [10 ];
292292
293293 int read = stream .read (buf , 0 , buf .length );
@@ -302,7 +302,7 @@ public void sizeEnforcingInputStream_readBelowLimit() throws IOException {
302302 public void sizeEnforcingInputStream_readAtLimit () throws IOException {
303303 ByteArrayInputStream in = new ByteArrayInputStream ("foo" .getBytes (Charsets .UTF_8 ));
304304 SizeEnforcingInputStream stream =
305- new MessageDeframer .SizeEnforcingInputStream (in , 3 , statsTraceCtx );
305+ new MessageDeframer .SizeEnforcingInputStream (in , 3 , statsTraceCtx , "test" );
306306 byte [] buf = new byte [10 ];
307307
308308 int read = stream .read (buf , 0 , buf .length );
@@ -317,11 +317,11 @@ public void sizeEnforcingInputStream_readAtLimit() throws IOException {
317317 public void sizeEnforcingInputStream_readAboveLimit () throws IOException {
318318 ByteArrayInputStream in = new ByteArrayInputStream ("foo" .getBytes (Charsets .UTF_8 ));
319319 SizeEnforcingInputStream stream =
320- new MessageDeframer .SizeEnforcingInputStream (in , 2 , statsTraceCtx );
320+ new MessageDeframer .SizeEnforcingInputStream (in , 2 , statsTraceCtx , "test" );
321321 byte [] buf = new byte [10 ];
322322
323323 thrown .expect (StatusRuntimeException .class );
324- thrown .expectMessage ("INTERNAL: Compressed frame exceeds" );
324+ thrown .expectMessage ("INTERNAL: test: Compressed frame exceeds" );
325325
326326 stream .read (buf , 0 , buf .length );
327327
@@ -333,7 +333,7 @@ public void sizeEnforcingInputStream_readAboveLimit() throws IOException {
333333 public void sizeEnforcingInputStream_skipBelowLimit () throws IOException {
334334 ByteArrayInputStream in = new ByteArrayInputStream ("foo" .getBytes (Charsets .UTF_8 ));
335335 SizeEnforcingInputStream stream =
336- new MessageDeframer .SizeEnforcingInputStream (in , 4 , statsTraceCtx );
336+ new MessageDeframer .SizeEnforcingInputStream (in , 4 , statsTraceCtx , "test" );
337337
338338 long skipped = stream .skip (4 );
339339
@@ -348,7 +348,7 @@ public void sizeEnforcingInputStream_skipBelowLimit() throws IOException {
348348 public void sizeEnforcingInputStream_skipAtLimit () throws IOException {
349349 ByteArrayInputStream in = new ByteArrayInputStream ("foo" .getBytes (Charsets .UTF_8 ));
350350 SizeEnforcingInputStream stream =
351- new MessageDeframer .SizeEnforcingInputStream (in , 3 , statsTraceCtx );
351+ new MessageDeframer .SizeEnforcingInputStream (in , 3 , statsTraceCtx , "test" );
352352
353353 long skipped = stream .skip (4 );
354354
@@ -362,10 +362,10 @@ public void sizeEnforcingInputStream_skipAtLimit() throws IOException {
362362 public void sizeEnforcingInputStream_skipAboveLimit () throws IOException {
363363 ByteArrayInputStream in = new ByteArrayInputStream ("foo" .getBytes (Charsets .UTF_8 ));
364364 SizeEnforcingInputStream stream =
365- new MessageDeframer .SizeEnforcingInputStream (in , 2 , statsTraceCtx );
365+ new MessageDeframer .SizeEnforcingInputStream (in , 2 , statsTraceCtx , "test" );
366366
367367 thrown .expect (StatusRuntimeException .class );
368- thrown .expectMessage ("INTERNAL: Compressed frame exceeds" );
368+ thrown .expectMessage ("INTERNAL: test: Compressed frame exceeds" );
369369
370370 stream .skip (4 );
371371
@@ -377,7 +377,7 @@ public void sizeEnforcingInputStream_skipAboveLimit() throws IOException {
377377 public void sizeEnforcingInputStream_markReset () throws IOException {
378378 ByteArrayInputStream in = new ByteArrayInputStream ("foo" .getBytes (Charsets .UTF_8 ));
379379 SizeEnforcingInputStream stream =
380- new MessageDeframer .SizeEnforcingInputStream (in , 3 , statsTraceCtx );
380+ new MessageDeframer .SizeEnforcingInputStream (in , 3 , statsTraceCtx , "test" );
381381 // stream currently looks like: |foo
382382 stream .skip (1 ); // f|oo
383383 stream .mark (10 ); // any large number will work.
0 commit comments