Skip to content

Commit d916f26

Browse files
authored
HADOOP-19627. S3A: testIfMatchOverwriteWithOutdatedEtag() fails when not using SSE-KMS #7816
Contributed by Ahmar Suhail
1 parent d35b321 commit d916f26

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/impl/ITestS3APutIfMatchAndIfNoneMatch.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,11 @@ public void testIfMatchOverwriteWithOutdatedEtag() throws Throwable {
469469
.as("ETag should not be null after file creation")
470470
.isNotNull();
471471

472+
String updatedFileContent = "Updated content";
473+
byte[] updatedData = updatedFileContent.getBytes(StandardCharsets.UTF_8);
474+
472475
// Overwrite the file. Will update the etag, making the previously fetched etag outdated.
473-
createFileWithFlags(fs, path, SMALL_FILE_BYTES, false, null);
476+
createFileWithFlags(fs, path, updatedData, false, null);
474477

475478
// overwrite file with outdated etag. Should throw RemoteFileChangedException
476479
RemoteFileChangedException exception = intercept(RemoteFileChangedException.class,

0 commit comments

Comments
 (0)