File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
java-showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 4242import java .util .stream .Stream ;
4343import org .junit .jupiter .api .AfterAll ;
4444import org .junit .jupiter .api .BeforeAll ;
45+ import org .junit .jupiter .api .Test ;
4546import org .junit .jupiter .params .ParameterizedTest ;
4647import org .junit .jupiter .params .provider .Arguments ;
4748import org .junit .jupiter .params .provider .MethodSource ;
@@ -115,6 +116,19 @@ static void destroyClients() throws InterruptedException {
115116 TestClientInitializer .AWAIT_TERMINATION_SECONDS , TimeUnit .SECONDS );
116117 }
117118
119+ @ Test
120+ void verifyByteSizeOfExtremePayload () {
121+ RepeatRequest request = complianceSuite .getGroup (0 ).getRequests (3 );
122+ assertThat (request .getName ()).isEqualTo ("Extreme values" );
123+ int fStringCount = request .getInfo ().getFString ().length ();
124+ assertThat (fStringCount ).isEqualTo (69 );
125+ System .out .println (request .getInfo ().getFString ());
126+ int fStringBytes = request .getInfo ().getFStringBytes ().size ();
127+ assertThat (fStringBytes ).isEqualTo (77 );
128+ int requestBytes = request .getSerializedSize ();
129+ assertThat (requestBytes ).isEqualTo (222 );
130+ }
131+
118132 // Verify that the input's info is the same as the response's info
119133 // This ensures that the entire group's behavior over HttpJson
120134 // works as intended
You can’t perform that action at this time.
0 commit comments