Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions adminapi/src/main/java/io/minio/admin/MinioAdminClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ public void setBucketQuota(@Nonnull String bucketName, long size, @Nonnull Quota
throws MinioException {
Map<String, Object> quotaEntity = new HashMap<>();
if (size > 0) quotaEntity.put("quotatype", "hard");
quotaEntity.put("quota", unit.toBytes(size));
quotaEntity.put("size", unit.toBytes(size));
try (Response response =
execute(
Http.Method.PUT,
Expand Down Expand Up @@ -471,7 +471,7 @@ public long getBucketQuota(String bucketName) throws MinioException {
.getTypeFactory()
.constructMapType(HashMap.class, String.class, JsonNode.class);
Map<String, JsonNode> quotaEntity = OBJECT_MAPPER.readValue(response.body().bytes(), mapType);
JsonNode quota = quotaEntity.get("quota");
JsonNode quota = quotaEntity.get("size");
if (quota == null) throw new MinioException("quota not found in response");
// JsonNode.asLong() coerces anything non-numeric to zero, making a malformed response
// indistinguishable from a cleared quota; reject such values instead.
Expand Down
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ subprojects {
}
}

test {
tasks.withType(Test).configureEach {
// Show stacktrace on test failure than opening in web browser.
testLogging {
exceptionFormat = 'full'
Expand All @@ -101,6 +101,10 @@ subprojects {

tasks.register('localeTest', Test) {
description = 'Runs tests with locale de-DE'
// A Test task registered this way has no test classes of its own; without these two
// lines it reports NO-SOURCE and runs nothing.
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
Comment thread
balamurugana marked this conversation as resolved.
systemProperty 'user.language', 'de'
systemProperty 'user.country', 'DE'
}
Expand Down
Loading