Skip to content

Commit fd674d0

Browse files
committed
delete unused utils
1 parent c1acdd8 commit fd674d0

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

services/s3/src/test/java/software/amazon/awssdk/services/s3/internal/multipart/MultipartDownloadTestUtil.java

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -71,20 +71,6 @@ public byte[] stubForPart(String testBucket, String testKey,int part, int totalP
7171
.withHeader("x-amz-mp-parts-count", totalPart + "")
7272
.withHeader("ETag", eTag)
7373
.withHeader("Content-Length", String.valueOf(body.length))
74-
.withHeader("Content-Range", contentRange(part, totalPart, partSize))
75-
.withBody(body)));
76-
return body;
77-
}
78-
79-
public byte[] stubForPartwithWrongContentRange(String testBucket, String testKey,int part, int totalPart, int partSize) {
80-
byte[] body = new byte[partSize];
81-
random.nextBytes(body);
82-
stubFor(get(urlEqualTo(String.format("/%s/%s?partNumber=%d", testBucket, testKey, part))).willReturn(
83-
aResponse()
84-
.withHeader("x-amz-mp-parts-count", totalPart + "")
85-
.withHeader("ETag", eTag)
86-
.withHeader("Content-Length", String.valueOf(body.length))
87-
.withHeader("Content-Range", contentRange(part, totalPart, partSize + 1))
8874
.withBody(body)));
8975
return body;
9076
}
@@ -110,16 +96,4 @@ public byte[] stubForPartSuccess(int part, int totalPart, int partSize) {
11096
.withBody(body)));
11197
return body;
11298
}
113-
114-
private String contentRange(int part, int totalPart, int partSize) {
115-
long totalObjectSize = (long) totalPart * partSize;
116-
long startByte = (long) (part - 1) * partSize;
117-
long endByte = startByte + partSize - 1;
118-
119-
if (part == totalPart) {
120-
endByte = totalObjectSize - 1;
121-
}
122-
123-
return String.format("bytes %d-%d/%d", startByte, endByte, totalObjectSize);
124-
}
12599
}

0 commit comments

Comments
 (0)