Skip to content

Commit

Permalink
fix tests and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
untitaker committed May 17, 2024
1 parent dfe3eb4 commit f06f61e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions rust-arroyo/examples/base_processor.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
extern crate rust_arroyo;

use chrono::Duration;
use std::time::Duration;

use rust_arroyo::backends::kafka::config::KafkaConfig;
use rust_arroyo::backends::kafka::types::KafkaPayload;
use rust_arroyo::backends::kafka::InitialOffset;
Expand All @@ -12,7 +13,7 @@ use rust_arroyo::types::Topic;
struct TestFactory {}
impl ProcessingStrategyFactory<KafkaPayload> for TestFactory {
fn create(&self) -> Box<dyn ProcessingStrategy<KafkaPayload>> {
Box::new(CommitOffsets::new(Duration::seconds(1)))
Box::new(CommitOffsets::new(Duration::from_secs(1)))
}
}

Expand Down
2 changes: 1 addition & 1 deletion rust-arroyo/src/processing/strategies/commit_offsets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ mod tests {
}),
};

let mut noop = CommitOffsets::new(chrono::Duration::seconds(1));
let mut noop = CommitOffsets::new(Duration::from_secs(1));

let mut commit_req1 = CommitRequest {
positions: Default::default(),
Expand Down

0 comments on commit f06f61e

Please sign in to comment.