Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
yirutang committed Nov 7, 2023
1 parent 88c4327 commit d570b6e
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1577,13 +1577,22 @@ public void testLargeRequest() throws IOException, InterruptedException, Executi
List<Integer> sizeSet = Arrays.asList(7 * 1024 * 1024, 19 * 1024 * 1024);
List<ApiFuture<AppendRowsResponse>> responseList =
new ArrayList<ApiFuture<AppendRowsResponse>>();
Random r = new Random();
for (int i = 0; i < 10; i++) {
responseList.add(
streamWriter.append(
CreateProtoRows(new String[] {new String(new char[sizeSet.get(0)]).replace("\0", "a")})));
CreateProtoRows(
new String[] {
new String(new char[sizeSet.get(0)])
.replace('\u0000', (char) (r.nextInt(26) + 'a'))
})));
responseList.add(
streamWriter.append(
CreateProtoRows(new String[] {new String(new char[sizeSet.get(1)]).replace("\0", "a")})));
CreateProtoRows(
new String[] {
new String(new char[sizeSet.get(1)])
.replace('\u0000', (char) (r.nextInt(26) + 'a'))
})));
}
for (int i = 0; i < 20; i++) {
assertFalse(responseList.get(i).get().hasError());
Expand Down

0 comments on commit d570b6e

Please sign in to comment.