Skip to content

Commit

Permalink
update TestGcmStreams
Browse files Browse the repository at this point in the history
  • Loading branch information
ggershinsky committed Jan 8, 2024
1 parent 48a1141 commit 4970451
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/
package org.apache.iceberg.encryption;

import java.io.EOFException;
import java.io.File;
import java.io.IOException;
import java.nio.ByteBuffer;
Expand Down Expand Up @@ -60,8 +59,7 @@ public void testEmptyFile() throws IOException {
Assert.assertEquals("File size", 0, decryptedFile.getLength());

try (SeekableInputStream decryptedStream = decryptedFile.newStream()) {
Assertions.assertThatThrownBy(() -> decryptedStream.read(readBytes))
.isInstanceOf(EOFException.class);
Assert.assertEquals("Read empty stream", -1, decryptedStream.read(readBytes));
}

// check that the AAD is still verified, even for an empty file
Expand Down

0 comments on commit 4970451

Please sign in to comment.