From 187398ccd1569316ad7303cdc86f7faed98e1eb1 Mon Sep 17 00:00:00 2001 From: Vigith Maurice Date: Thu, 17 Oct 2024 10:50:00 -0700 Subject: [PATCH] fix: main branch, offset type got updated (#2171) Signed-off-by: Vigith Maurice --- rust/numaflow-core/src/sink/blackhole.rs | 11 +++-------- rust/numaflow-core/src/sink/log.rs | 11 +++-------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/rust/numaflow-core/src/sink/blackhole.rs b/rust/numaflow-core/src/sink/blackhole.rs index 1f9fad639..d4828ca1f 100644 --- a/rust/numaflow-core/src/sink/blackhole.rs +++ b/rust/numaflow-core/src/sink/blackhole.rs @@ -22,6 +22,7 @@ mod tests { use chrono::Utc; use super::BlackholeSink; + use crate::message::IntOffset; use crate::{ message::{Message, MessageID, Offset, ResponseFromSink, ResponseStatusFromSink}, sink::Sink, @@ -34,10 +35,7 @@ mod tests { Message { keys: vec![], value: b"Hello, World!".to_vec(), - offset: Offset { - offset: "1".to_string(), - partition_id: 0, - }, + offset: Some(Offset::Int(IntOffset::new(1, 0))), event_time: Utc::now(), headers: Default::default(), id: MessageID { @@ -49,10 +47,7 @@ mod tests { Message { keys: vec![], value: b"Hello, World!".to_vec(), - offset: Offset { - offset: "2".to_string(), - partition_id: 0, - }, + offset: Some(Offset::Int(IntOffset::new(1, 0))), event_time: Utc::now(), headers: Default::default(), id: MessageID { diff --git a/rust/numaflow-core/src/sink/log.rs b/rust/numaflow-core/src/sink/log.rs index 3a978b1d2..be6a89755 100644 --- a/rust/numaflow-core/src/sink/log.rs +++ b/rust/numaflow-core/src/sink/log.rs @@ -38,6 +38,7 @@ mod tests { use chrono::Utc; use super::LogSink; + use crate::message::IntOffset; use crate::{ message::{Message, MessageID, Offset, ResponseFromSink, ResponseStatusFromSink}, sink::Sink, @@ -50,10 +51,7 @@ mod tests { Message { keys: vec![], value: b"Hello, World!".to_vec(), - offset: Offset { - offset: "1".to_string(), - partition_id: 0, - }, + offset: Some(Offset::Int(IntOffset::new(1, 0))), event_time: Utc::now(), headers: Default::default(), id: MessageID { @@ -65,10 +63,7 @@ mod tests { Message { keys: vec![], value: b"Hello, World!".to_vec(), - offset: Offset { - offset: "2".to_string(), - partition_id: 0, - }, + offset: Some(Offset::Int(IntOffset::new(1, 0))), event_time: Utc::now(), headers: Default::default(), id: MessageID {