Skip to content

Commit

Permalink
Setting Up Indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
aga9900 committed Dec 18, 2024
1 parent 00bf73f commit 711728a
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,8 @@ public void doFileCopyMetaDataRequestTest() throws IOException {
MockClusterMap clusterMap = new MockClusterMap();
short requestVersionToUse = 1;
FileCopyProtocolGetMetaDataRequest request =
new FileCopyProtocolGetMetaDataRequest(requestVersionToUse, 111, "id1", new MockPartitionId(), "host3");
new FileCopyProtocolGetMetaDataRequest(requestVersionToUse, 111, "id1",
new MockPartitionId(), "host3");
DataInputStream requestStream = serAndPrepForRead(request, -1, true);
FileCopyProtocolGetMetaDataRequest fileMetadataRequestFromBytes =
FileCopyProtocolGetMetaDataRequest.readFrom(requestStream, new MockClusterMap());
Expand Down Expand Up @@ -761,7 +762,8 @@ public void doFileCopyMetaDataResponseTest() throws IOException{
public void doFileCopyChunkRequestTest() throws IOException{
short requestVersionToUse = 1;
FileCopyProtocolGetChunkRequest request =
new FileCopyProtocolGetChunkRequest(requestVersionToUse, 111, "id1", new MockPartitionId(), "file1", 1000, 100);
new FileCopyProtocolGetChunkRequest(requestVersionToUse, 111, "id1",
new MockPartitionId(), "file1", 1000, 100);
DataInputStream requestStream = serAndPrepForRead(request, -1, true);
FileCopyProtocolGetChunkRequest.readFrom(requestStream, new MockClusterMap());
Assert.assertEquals(request.getFileName(), "file1");
Expand All @@ -780,9 +782,12 @@ public void doFileCopyChunkResponseTest() throws IOException{
String str = "Hello, Netty ByteBuf!";
ByteBuf byteBuf = Unpooled.copiedBuffer(str, StandardCharsets.UTF_8);
FileCopyProtocolGetChunkResponse response =
new FileCopyProtocolGetChunkResponse(requestVersionToUse, 111, "id1", ServerErrorCode.No_Error, new MockPartitionId(), "file1", byteBuf, 1000,byteBuf.readableBytes(), false );
new FileCopyProtocolGetChunkResponse(requestVersionToUse, 111, "id1", ServerErrorCode.No_Error,
new MockPartitionId(), "file1", byteBuf, 1000,byteBuf.readableBytes(),
false );
DataInputStream requestStream = serAndPrepForRead(response, -1, false);
FileCopyProtocolGetChunkResponse fileCopyProtocolGetChunkResponse = FileCopyProtocolGetChunkResponse.readFrom(requestStream, new MockClusterMap());
FileCopyProtocolGetChunkResponse fileCopyProtocolGetChunkResponse = FileCopyProtocolGetChunkResponse.readFrom(
requestStream, new MockClusterMap());
Assert.assertEquals(fileCopyProtocolGetChunkResponse.getFileName(), "file1");
Assert.assertEquals(fileCopyProtocolGetChunkResponse.getChunkSizeInBytes(), str.length());
Assert.assertEquals(fileCopyProtocolGetChunkResponse.getPartitionId().getId(), 0);
Expand Down

0 comments on commit 711728a

Please sign in to comment.