()
| 3739 | #[cfg_attr(miri, ignore)] // too slow |
| 3740 | #[allow(clippy::disallowed_methods)] |
| 3741 | async fn test_explain_timestamp_blocking() { |
| 3742 | let server = test_util::TestHarness::default().start().await; |
| 3743 | server |
| 3744 | .enable_feature_flags(&["enable_refresh_every_mvs"]) |
| 3745 | .await; |
| 3746 | let client = server.connect().await.unwrap(); |
| 3747 | // This test will break in the year 30,000 after Jan 1st. When that happens, increase the year |
| 3748 | // to fix the test. |
| 3749 | client |
| 3750 | .batch_execute( |
| 3751 | "CREATE MATERIALIZED VIEW const_mv WITH (REFRESH AT '30000-01-01 23:59') AS SELECT 2;", |
| 3752 | ) |
| 3753 | .await |
| 3754 | .unwrap(); |
| 3755 | |
| 3756 | let mv_timestamp = get_explain_timestamp("const_mv", &client).await; |
| 3757 | |
| 3758 | let row = client |
| 3759 | .query_one("SELECT mz_now()::text;", &[]) |
| 3760 | .await |
| 3761 | .unwrap(); |
| 3762 | let mz_now_ts_raw: String = row.get(0); |
| 3763 | let mz_now_timestamp: EpochMillis = mz_now_ts_raw.parse().unwrap(); |
| 3764 | |
| 3765 | assert!( |
| 3766 | mv_timestamp > mz_now_timestamp, |
| 3767 | "read against mv at timestamp {mv_timestamp} should be in the future compared to now, {mz_now_timestamp}" |
| 3768 | ); |
| 3769 | } |
| 3770 | |
| 3771 | #[mz_ore::test(tokio::test(flavor = "multi_thread", worker_threads = 1))] |
| 3772 | #[cfg_attr(miri, ignore)] // too slow |
nothing calls this directly
no test coverage detected