MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / await_progress

Function await_progress

src/environmentd/tests/sql.rs:753–769  ·  view source on GitHub ↗

Asserts that the next message has a timestamp of at least `ts` and is a progress message. Returns the timestamp of the progress message.

(
                    client: &mut postgres::Client,
                    last_seen_ts: &mut u64,
                    ts: u64,
                )

Source from the content-addressed store, hash-verified

751 //
752 // Returns the timestamp of the progress message.
753 fn await_progress(
754 client: &mut postgres::Client,
755 last_seen_ts: &mut u64,
756 ts: u64,
757 ) -> u64 {
758 debug!("awaiting progress");
759 let row = client.query_one("FETCH 1 c1", &[]).unwrap();
760 debug!(?row);
761 assert_eq!(row.get::<_, bool>("mz_progressed"), true);
762 assert_eq!(row.get::<_, Option<i64>>("mz_diff"), None);
763 assert_eq!(row.get::<_, Option<String>>("data"), None);
764 let progress_ts = row.get::<_, MzTimestamp>("mz_timestamp").0;
765 assert!(progress_ts >= ts);
766 assert!(progress_ts >= *last_seen_ts);
767 *last_seen_ts = progress_ts;
768 progress_ts
769 }
770
771 let mut last_seen_ts = 0;
772

Callers 1

test_subscribe_progressFunction · 0.85

Calls 2

unwrapMethod · 0.80
query_oneMethod · 0.45

Tested by

no test coverage detected