Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions core/alumet/tests/control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ fn source_flush() {

// poll often but never flush automatically
let trigger = TriggerSpec::builder(Duration::from_millis(100))
.flush_interval(Duration::from_secs(120))
.flush_interval(Duration::from_secs(1_000))
.build()
.unwrap();

Expand Down Expand Up @@ -273,17 +273,14 @@ fn source_flush() {

// check that the source has been flushed
println!("checking flush");
let n_written_after_flush = counters.n_written.load(COUNTER_ORD);
let n_flushed_after_flush = counters.n_transform_in.load(COUNTER_ORD);
assert_ne!(n_flushed_after_flush, 0);

// check that the manual flush happens only once
println!("waiting more");
std::thread::sleep(Duration::from_millis(500));
println!("checking not flushed");
let n_written_later = counters.n_written.load(COUNTER_ORD);
let n_flushed_later = counters.n_transform_in.load(COUNTER_ORD);
assert!(n_written_later > n_written_after_flush);
Comment thread
titouanj marked this conversation as resolved.
assert_eq!(n_flushed_later, n_flushed_after_flush);

// shutdown
Expand Down
Loading