Verify that blobstore quota limits are enforced.

Bug: 153488316
Bug: 150619869
Test: atest --test-mapping apex/blobstore
Change-Id: I6b6cc1f57aaca96ee1d1a3d1d819cff5594e428d
This commit is contained in:
Sudheer Shanka
2020-04-22 03:36:18 -07:00
parent 715d65f9c7
commit f80c8e536c
2 changed files with 4 additions and 1 deletions

View File

@@ -77,7 +77,7 @@ public class DummyBlobData {
return mRandomSeed;
}
public Builder setFileSize(int fileSize) {
public Builder setFileSize(long fileSize) {
mFileSize = fileSize;
return this;
}

View File

@@ -34,6 +34,9 @@ import java.io.OutputStream;
public class Utils {
public static final int BUFFER_SIZE_BYTES = 16 * 1024;
public static final long KB_IN_BYTES = 1000;
public static final long MB_IN_BYTES = KB_IN_BYTES * 1000;
public static void copy(InputStream in, OutputStream out, long lengthBytes)
throws IOException {
final byte[] buffer = new byte[BUFFER_SIZE_BYTES];