This is an automated email from the ASF dual-hosted git repository.
lordgamez pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
The following commit(s) were added to refs/heads/main by this push:
new 532038562 MINIFICPP-2948 Fix deprecated function use in GetFileRs test
(#2308)
532038562 is described below
commit 532038562e95bcf1c27f1183aed8086be0106438
Author: Gabor Gyimesi <[email protected]>
AuthorDate: Tue Nov 17 16:46:56 2026 +0100
MINIFICPP-2948 Fix deprecated function use in GetFileRs test (#2308)
---
.../minifi_rs_playground/src/processors/get_file/tests.rs | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git
a/minifi_rust/extensions/minifi_rs_playground/src/processors/get_file/tests.rs
b/minifi_rust/extensions/minifi_rs_playground/src/processors/get_file/tests.rs
index 8fd31db0f..e7bb80062 100644
---
a/minifi_rust/extensions/minifi_rs_playground/src/processors/get_file/tests.rs
+++
b/minifi_rust/extensions/minifi_rs_playground/src/processors/get_file/tests.rs
@@ -4,7 +4,6 @@
use super::*;
use crate::processors::get_file::relationships::SUCCESS;
-use filetime::FileTime;
use minifi_native::{MockLogger, MockProcessContext, MockProcessSession};
use tempfile::TempDir;
@@ -52,8 +51,11 @@ fn simple_get_file_test() {
fn make_file(temp_dir: &TempDir, file_name: &str, size: usize, age: Duration) {
let path = temp_dir.path().join(file_name);
std::fs::write(&path, "a".repeat(size)).unwrap();
- let file_time = FileTime::from_system_time(SystemTime::now() - age);
- filetime::set_file_mtime(path, file_time).expect("Cannot set file time");
+ let file_time = SystemTime::now() - age;
+ let times = std::fs::FileTimes::new()
+ .set_accessed(file_time)
+ .set_modified(file_time);
+ std::fs::set_times(&path, times).expect("Cannot set file times");
}
fn create_test_directory() -> TempDir {