You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by si...@apache.org on 2026/10/09 08:36:58 UTC
(ozone) branch master updated: HDDS-16802. TestAuthorizationV4HeaderParser#testV4HeaderDateValidationSuccess fails near midnight (#11453)
This is an automated email from the ASF dual-hosted git repository.
smengcl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new ea69b4a7d9a HDDS-16802. TestAuthorizationV4HeaderParser#testV4HeaderDateValidationSuccess fails near midnight (#11453)
ea69b4a7d9a is described below
commit ea69b4a7d9abd040e5259dbcbb7c6ce52eb5d199
Author: Siyao Meng <50...@users.noreply.github.com>
AuthorDate: Fri Oct 9 01:36:52 2026 -0700
HDDS-16802. TestAuthorizationV4HeaderParser#testV4HeaderDateValidationSuccess fails near midnight (#11453)
Co-authored-by: Claude Opus 5.5 (1M context) <no...@anthropic.com>
---
.../ozone/s3/signature/TestAuthorizationV4HeaderParser.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/s3/signature/TestAuthorizationV4HeaderParser.java b/hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/s3/signature/TestAuthorizationV4HeaderParser.java
index 0c259c42377..01bbdd8af86 100644
--- a/hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/s3/signature/TestAuthorizationV4HeaderParser.java
+++ b/hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/s3/signature/TestAuthorizationV4HeaderParser.java
@@ -43,10 +43,9 @@ public class TestAuthorizationV4HeaderParser {
@BeforeEach
public void setup() {
- LocalDate now = LocalDate.now(ZoneOffset.UTC);
+ LocalDateTime now = LocalDateTime.now(ZoneOffset.UTC);
curDate = DATE_FORMATTER.format(now);
- sampleDate = StringToSignProducer.TIME_FORMATTER.format(
- LocalDateTime.now(ZoneOffset.UTC));
+ sampleDate = StringToSignProducer.TIME_FORMATTER.format(now);
}
@Test
@@ -114,9 +113,10 @@ public void testV4HeaderDateValidationSuccess()
throws MalformedResourceException {
testRequestWithSpecificDate(curDate);
- String amzDatePlus14Min = StringToSignProducer.TIME_FORMATTER.format(
- LocalDateTime.now(ZoneOffset.UTC).plus(14, MINUTES));
- testRequestWithSpecificDate(curDate, amzDatePlus14Min);
+ // Scope date must match X-Amz-Date, which may fall on the next day near midnight.
+ LocalDateTime plus14Min = LocalDateTime.now(ZoneOffset.UTC).plus(14, MINUTES);
+ testRequestWithSpecificDate(DATE_FORMATTER.format(plus14Min),
+ StringToSignProducer.TIME_FORMATTER.format(plus14Min));
}
@Test
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ozone.apache.org
For additional commands, e-mail: commits-help@ozone.apache.org