Skip to content

Commit

Permalink
refactor(e2e): use __NOW__ substitution in e2e test for `generate_s…
Browse files Browse the repository at this point in the history
…eries` ends with `now()` (risingwavelabs#17527)

Signed-off-by: Richard Chien <[email protected]>
  • Loading branch information
stdrc authored Jul 2, 2024
1 parent d9a90d6 commit 761f142
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
3 changes: 0 additions & 3 deletions ci/scripts/run-e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ RUST_LOG="info,risingwave_stream=info,risingwave_batch=info,risingwave_storage=i
cluster_start
# Please make sure the regression is expected before increasing the timeout.
sqllogictest -p 4566 -d dev './e2e_test/streaming/**/*.slt' --junit "streaming-${profile}"
if [[ "$mode" != "single-node" ]]; then
sqllogictest -p 4566 -d dev './e2e_test/streaming_now/**/*.slt' --junit "streaming-${profile}"
fi
sqllogictest -p 4566 -d dev './e2e_test/backfill/sink/different_pk_and_dist_key.slt'

echo "--- Kill cluster"
Expand Down
9 changes: 5 additions & 4 deletions e2e_test/streaming_now/now.slt → e2e_test/streaming/now.slt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
system ok
./risedev psql -c "
control substitution on

statement ok
create materialized view mv as
select * from generate_series(
to_timestamp($(date +%s)) - interval '10 second',
-- $__NOW__ is in nanoseconds, `to_timestamp` expects seconds
to_timestamp($__NOW__ / 1000.0 / 1000.0 / 1000.0) - interval '10 second',
now(),
interval '1 second'
);
"

statement ok
flush;
Expand Down
1 change: 0 additions & 1 deletion e2e_test/streaming_now/README

This file was deleted.

0 comments on commit 761f142

Please sign in to comment.