diff --git a/adminapi/src/main/java/io/minio/admin/MinioAdminClient.java b/adminapi/src/main/java/io/minio/admin/MinioAdminClient.java index 6e3c3ec50..31bcec824 100644 --- a/adminapi/src/main/java/io/minio/admin/MinioAdminClient.java +++ b/adminapi/src/main/java/io/minio/admin/MinioAdminClient.java @@ -440,7 +440,7 @@ public void setBucketQuota(@Nonnull String bucketName, long size, @Nonnull Quota throws MinioException { Map 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, @@ -471,7 +471,7 @@ public long getBucketQuota(String bucketName) throws MinioException { .getTypeFactory() .constructMapType(HashMap.class, String.class, JsonNode.class); Map 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. diff --git a/build.gradle b/build.gradle index ea462d43e..9878e0fb8 100644 --- a/build.gradle +++ b/build.gradle @@ -89,7 +89,7 @@ subprojects { } } - test { + tasks.withType(Test).configureEach { // Show stacktrace on test failure than opening in web browser. testLogging { exceptionFormat = 'full' @@ -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 systemProperty 'user.language', 'de' systemProperty 'user.country', 'DE' }