Skip to content

Commit

Permalink
resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzl25 committed Nov 24, 2023
2 parents f0b2041 + 28d4fce commit 78c5e58
Show file tree
Hide file tree
Showing 193 changed files with 3,071 additions and 2,615 deletions.
19 changes: 19 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,22 @@ fail-fast = false
[profile.ci.junit]
path = "junit-nextest.xml"
report-name = "nextest-run"

[test-groups]
failpoint-limited = { max-threads = 1 }

[[profile.default.overrides]]
filter = 'test(failpoint_limited::)'
test-group = 'failpoint-limited'

[[profile.ci.overrides]]
filter = 'test(failpoint_limited::)'
test-group = 'failpoint-limited'

[[profile.ci-sim.overrides]]
filter = 'test(failpoint_limited::)'
test-group = 'failpoint-limited'

[[profile.ci.junit.overrides]]
filter = 'test(failpoint_limited::)'
test-group = 'failpoint-limited'
22 changes: 14 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions ci/scripts/e2e-source-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,16 @@ echo "--- mysql & postgres cdc validate test"
sqllogictest -p 4566 -d dev './e2e_test/source/cdc/cdc.validate.mysql.slt'
sqllogictest -p 4566 -d dev './e2e_test/source/cdc/cdc.validate.postgres.slt'

# cdc share stream test cases
export MYSQL_HOST=mysql MYSQL_TCP_PORT=3306 MYSQL_PWD=123456
sqllogictest -p 4566 -d dev './e2e_test/source/cdc/cdc.share_stream.slt'

echo "--- mysql & postgres load and check"
sqllogictest -p 4566 -d dev './e2e_test/source/cdc/cdc.load.slt'
# wait for cdc loading
sleep 10
sqllogictest -p 4566 -d dev './e2e_test/source/cdc/cdc.check.slt'

# cdc share stream test cases
export MYSQL_HOST=mysql MYSQL_TCP_PORT=3306 MYSQL_PWD=123456
sqllogictest -p 4566 -d dev './e2e_test/source/cdc/cdc.share_stream.slt'


# kill cluster
cargo make kill
echo "cluster killed "
Expand Down
3 changes: 2 additions & 1 deletion ci/scripts/run-e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ cluster_stop
echo "--- e2e, $mode, error ui"
RUST_LOG="info,risingwave_stream=info,risingwave_batch=info,risingwave_storage=info" \
cluster_start
sqllogictest -p 4566 -d dev './e2e_test/error_ui/**/*.slt'
sqllogictest -p 4566 -d dev './e2e_test/error_ui/simple/**/*.slt'
sqllogictest -p 4566 -d dev -e postgres-extended './e2e_test/error_ui/extended/**/*.slt'

echo "--- Kill cluster"
cluster_stop
Expand Down
5 changes: 5 additions & 0 deletions ci/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ steps:
- "cockroach-sink"
- "kafka-cdc-sink"
- "cassandra-and-scylladb-sink"
- "elasticsearch-sink"
format:
- "json"
- "protobuf"
Expand Down Expand Up @@ -164,3 +165,7 @@ steps:
testcase: "cassandra-and-scylladb-sink"
format: "protobuf"
skip: true
- with:
testcase: "elasticsearch-sink"
format: "protobuf"
skip: true
2 changes: 1 addition & 1 deletion ci/workflows/main-cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ steps:
run: rw-build-env
config: ci/docker-compose.yml
mount-buildkite-agent: true
timeout_in_minutes: 15
timeout_in_minutes: 20
retry: *auto-retry

- label: "docslt"
Expand Down
6 changes: 5 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ RUN rustup self update \
&& rustup show \
&& rustup component add rustfmt


RUN cargo install flamegraph
# TODO: cargo-chef doesn't work well now, because we update Cargo.lock very often.
# We may consider sccache instead.

Expand Down Expand Up @@ -115,6 +115,9 @@ FROM base AS risingwave

LABEL org.opencontainers.image.source https://github.com/risingwavelabs/risingwave

RUN apt-get update && apt-get -y install linux-tools-generic \
&& ln -s "$(find /usr/lib/linux-tools/*/perf | head -1)" /usr/local/bin/perf

RUN apt-get -y install gdb \
&& rm -rf /var/lib/{apt,dpkg,cache,log}/

Expand All @@ -125,6 +128,7 @@ COPY --from=rust-builder /risingwave/bin/risingwave.dwp /risingwave/bin/risingwa
COPY --from=java-builder /risingwave/bin/connector-node /risingwave/bin/connector-node
COPY --from=dashboard-builder /risingwave/dashboard/out /risingwave/ui
COPY --from=rust-builder /risingwave/bin/jeprof /usr/local/bin/jeprof
COPY --from=rust-base /root/.cargo/bin/flamegraph /usr/local/bin/flamegraph

# Set default playground mode to docker-playground profile
ENV PLAYGROUND_PROFILE docker-playground
Expand Down
2 changes: 1 addition & 1 deletion docker/dashboards/risingwave-dev-dashboard.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docker/dashboards/risingwave-user-dashboard.json

Large diffs are not rendered by default.

114 changes: 114 additions & 0 deletions e2e_test/batch/functions/encdec.slt.part
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Text/Binary String Conversion Functions

# encode/decode
# escape
query T
SELECT encode('\xc3b1', 'escape');
----
\303\261

query T
SELECT decode('\303\261', 'escape');
----
\xc3b1

query T
SELECT encode('\xe78e8be58695e6adbbe4ba86e788b6e4bab2', 'escape');
----
\347\216\213\345\206\225\346\255\273\344\272\206\347\210\266\344\272\262

query T
SELECT decode('王冕死了父亲', 'escape');
----
\xe78e8be58695e6adbbe4ba86e788b6e4bab2

# base64
query T
SELECT encode('123\000\001', 'base64');
----
MTIzAAE=

query T
SELECT decode('MTIzAAE=', 'base64');
----
\x3132330001

# hex
query T
SELECT encode('joanna', 'hex');
----
6a6f616e6e61

query T
SELECT decode('6a6f616e6e61', 'hex');
----
\x6a6f616e6e61

# convert
# convert_from
query T
SELECT convert_from('\xc3b1', 'UTF8');
----
ñ

query T
SELECT convert_from('\xe78e8be58695e6adbbe4ba86e788b6e4bab2', 'UTF8');
----
王冕死了父亲

query T
SELECT convert_from('\x6a6f616e6e61', 'UTF8');
----
joanna

# UTF[-]8, case-insensitive
query T
SELECT convert_from('\x6a6f616e6e61', 'UTF-8');
----
joanna

query T
SELECT convert_from('\x6a6f616e6e61', 'utf8');
----
joanna

query T
SELECT convert_from('\x6a6f616e6e61', 'utf-8');
----
joanna

query T
SELECT convert_from('\x6a6f616e6e61', 'UtF8');
----
joanna

query T
SELECT convert_from('\x6a6f616e6e61', 'uTF-8');
----
joanna

# convert_to
query T
SELECT convert_to('some_text', 'UTF8');
----
\x736f6d655f74657874

query T
SELECT convert_to('柠檬', 'UTF8');
----
\xe69fa0e6aaac

query T
SELECT convert_to('🍋', 'UTF8');
----
\xf09f8d8b

query T
SELECT convert_from(convert_to('good', 'UTF8'), 'UTF8');
----
good

query T
SELECT convert_from(convert_to('wow🐮', 'UTF8'), 'UTF8');
----
wow🐮
72 changes: 48 additions & 24 deletions e2e_test/ddl/show.slt
Original file line number Diff line number Diff line change
Expand Up @@ -164,30 +164,54 @@ drop view v3;
statement ok
drop view v1;

statement ok
CREATE SINK sink3 AS select * from t3 WITH (
connector = 'blackhole'
);

query TTTT
describe sink3;
----
v1 integer false NULL
v2 integer false NULL
v3 integer false NULL
t3._row_id serial true NULL
distribution key t3._row_id NULL NULL
table description sink3 NULL NULL

query TTTT
show columns from sink3;
----
v1 integer false NULL
v2 integer false NULL
v3 integer false NULL
t3._row_id serial true NULL

statement ok
drop sink sink3;

statement ok
drop table t3;

# todo: re-enable it when we support these commands on view
# https://github.com/risingwavelabs/risingwave/issues/11234
#query TT
#describe pg_matviews;
#----
#schemaname varchar
#matviewname varchar
#matviewowner integer
#definition varchar
#matviewid integer
#matviewtimezone varchar
#matviewgraph varchar
#primary key schemaname, matviewname
#
#query TT
#show columns from pg_catalog.pg_matviews;
#----
#schemaname varchar
#matviewname varchar
#matviewowner integer
#definition varchar
#matviewid integer
#matviewtimezone varchar
#matviewgraph varchar
query TTTT
describe pg_matviews;
----
schemaname character varying false NULL
matviewname character varying false NULL
matviewowner integer false NULL
definition character varying false NULL
matviewid integer false NULL
matviewtimezone character varying false NULL
matviewgraph character varying false NULL
table description pg_matviews NULL NULL

query TTTT
show columns from pg_catalog.pg_matviews;
----
schemaname character varying false NULL
matviewname character varying false NULL
matviewowner integer false NULL
definition character varying false NULL
matviewid integer false NULL
matviewtimezone character varying false NULL
matviewgraph character varying false NULL
3 changes: 2 additions & 1 deletion e2e_test/error_ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ When you find the tests in this directory failing...
- First, ensure that the changes to the error messages are expected and make them look better.
- Then, update the test cases by running:
```bash
./risedev slt './e2e_test/error_ui/**/*.slt' --override
./risedev slt './e2e_test/error_ui/simple/**/*.slt' --override
./risedev slt './e2e_test/error_ui/extended/**/*.slt' --engine postgres-extended --override
```
Please note that the minimum required version of `sqllogictest` is 0.18 or higher.
Loading

0 comments on commit 78c5e58

Please sign in to comment.