You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by "rizaon (via GitHub)" <gi...@apache.org> on 2023/04/05 21:20:43 UTC

[GitHub] [thrift] rizaon commented on a diff in pull request #2772: THRIFT-5696: Allow custom TConfiguration for TByteBuffer.java

rizaon commented on code in PR #2772:
URL: https://github.com/apache/thrift/pull/2772#discussion_r1159033755


##########
lib/java/src/test/java/org/apache/thrift/transport/TestTByteBuffer.java:
##########
@@ -39,4 +41,29 @@ public void testOverflow() throws Exception {
             () -> byteBuffer.write("Hello World".getBytes(StandardCharsets.UTF_8)));
     assertEquals("Not enough room in output buffer", e.getMessage());
   }
+
+  @Test
+  public void testSmallTConfiguration() throws Exception {
+    // Test that TByteBuffer init fail with small max message size.
+    final TConfiguration configSmall =
+        new TConfiguration(
+            4, TConfiguration.DEFAULT_MAX_FRAME_SIZE, TConfiguration.DEFAULT_RECURSION_DEPTH);

Review Comment:
   I think there is checkstyle built in the gradle script. This pass `gradle :spotlessApply`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@thrift.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org