rok commented on code in PR #9203:
URL: https://github.com/apache/arrow-rs/pull/9203#discussion_r2853974767
##########
parquet/tests/encryption/encryption_async.rs:
##########
@@ -115,7 +115,7 @@ async fn test_misspecified_encryption_keys() {
// Too short footer key
check_for_error(
Review Comment:
How about also parameterizing existing roundtrip tests? Something like:
```diff
diff --git i/parquet/tests/encryption/encryption.rs
w/parquet/tests/encryption/encryption.rs
index c26a0edee..ad7bae837 100644
--- i/parquet/tests/encryption/encryption.rs
+++ w/parquet/tests/encryption/encryption.rs
@@ -388,27 +388,38 @@ fn row_group_sizes(metadata: &ParquetMetaData) ->
Vec<i64> {
#[test]
fn test_uniform_encryption_roundtrip() {
- uniform_encryption_roundtrip(false, false).unwrap();
+ uniform_encryption_roundtrip(false, false,
b"0123456789012345").unwrap();
}
#[test]
fn test_uniform_encryption_roundtrip_with_dictionary() {
- uniform_encryption_roundtrip(false, true).unwrap();
+ uniform_encryption_roundtrip(false, true, b"0123456789012345").unwrap();
}
#[test]
fn test_uniform_encryption_roundtrip_with_page_index() {
- uniform_encryption_roundtrip(true, false).unwrap();
+ uniform_encryption_roundtrip(true, false, b"0123456789012345").unwrap();
}
#[test]
fn test_uniform_encryption_roundtrip_with_page_index_and_dictionary() {
- uniform_encryption_roundtrip(true, true).unwrap();
+ uniform_encryption_roundtrip(true, true, b"0123456789012345").unwrap();
+}
+
+#[test]
+fn test_uniform_encryption_roundtrip_aes256() {
+ uniform_encryption_roundtrip(false, false,
b"01234567890123456789012345678901").unwrap();
+}
+
+#[test]
+fn test_uniform_encryption_roundtrip_aes256_with_dictionary() {
+ uniform_encryption_roundtrip(false, true,
b"01234567890123456789012345678901").unwrap();
}
fn uniform_encryption_roundtrip(
page_index: bool,
dictionary_encoding: bool,
+ footer_key: &[u8],
) -> parquet::errors::Result<()> {
let x0_arrays = [
Int32Array::from((0..100).collect::<Vec<_>>()),
@@ -426,7 +437,6 @@ fn uniform_encryption_roundtrip(
let file = tempfile::tempfile()?;
- let footer_key = b"0123456789012345";
let file_encryption_properties =
FileEncryptionProperties::builder(footer_key.to_vec()).build()?;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]