From b726bc09fe87cb548c499ff968ef6b52cbd3701e Mon Sep 17 00:00:00 2001 From: sinhaashish Date: Wed, 27 May 2020 20:33:34 +0530 Subject: [PATCH] Add withNano(0) to be S3 compatiable --- functional/FunctionalTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functional/FunctionalTest.java b/functional/FunctionalTest.java index b48ae955a..559d25220 100644 --- a/functional/FunctionalTest.java +++ b/functional/FunctionalTest.java @@ -3879,7 +3879,7 @@ public static void getObjectRetention_test1() throws Exception { client.getObjectRetention( GetObjectRetentionArgs.builder().bucket(bucketName).object(objectName).build()); - if (!(config.retainUntilDate().equals(expectedConfig.retainUntilDate())) + if (!(config.retainUntilDate().withNano(0).equals(expectedConfig.retainUntilDate())) || (config.mode() != expectedConfig.mode())) { throw new Exception( "[FAILED] Expected: expected duration : " @@ -3913,6 +3913,7 @@ public static void getObjectRetention_test1() throws Exception { if (!(updatedConfig .retainUntilDate() + .withNano(0) .equals(expectedConfigWithShortenedPeriod.retainUntilDate())) || (updatedConfig.mode() != expectedConfigWithShortenedPeriod.mode())) { throw new Exception(