Skip to content

Commit 723a52d

Browse files
committed
tweak stateless tests
1 parent 92a2c9a commit 723a52d

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

tests/suites/5_ee/01_vacuum/01_0000_ee_vacuum.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def compact_data(name):
6666
mycursor.execute("select a from gc_test order by a;")
6767
old_datas = mycursor.fetchall()
6868

69-
mycursor.execute("vacuum table gc_test dry run;")
69+
mycursor.execute("settings (fallback_to_legacy_vacuum=1) vacuum table gc_test dry run;")
7070
datas = mycursor.fetchall()
7171
print(datas)
7272

@@ -76,7 +76,7 @@ def compact_data(name):
7676
if old_datas != datas:
7777
print("vacuum dry run lose data: %s : %s" % (old_datas, datas))
7878

79-
client1.send("vacuum table gc_test;")
79+
client1.send("settings (fallback_to_legacy_vacuum=1) vacuum table gc_test;")
8080
client1.expect(prompt)
8181

8282
mycursor.execute("select a from gc_test order by a;")

tests/suites/5_ee/01_vacuum/01_0002_ee_vacuum_drop_table.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ echo "CREATE DATABASE test_vacuum_drop_dry_run" | $BENDSQL_CLIENT_CONNECT
99
echo "create table test_vacuum_drop_dry_run.a(c int)" | $BENDSQL_CLIENT_CONNECT
1010
echo "INSERT INTO test_vacuum_drop_dry_run.a VALUES (1)" | $BENDSQL_CLIENT_OUTPUT_NULL
1111
echo "drop table test_vacuum_drop_dry_run.a" | $BENDSQL_CLIENT_CONNECT
12-
count=$(echo "set data_retention_time_in_days=0; vacuum drop table dry run" | $BENDSQL_CLIENT_CONNECT | wc -l)
12+
count=$(echo "set data_retention_time_in_days=0; settings (fallback_to_legacy_vacuum=1) vacuum drop table dry run" | $BENDSQL_CLIENT_CONNECT | wc -l)
1313
if [[ ! "$count" ]]; then
1414
echo "vacuum drop table dry run, count:$count"
1515
exit 1
1616
fi
17-
count=$(echo "set data_retention_time_in_days=0; vacuum drop table dry run summary" | $BENDSQL_CLIENT_CONNECT | wc -l)
17+
count=$(echo "set data_retention_time_in_days=0; settings (fallback_to_legacy_vacuum=1) vacuum drop table dry run summary" | $BENDSQL_CLIENT_CONNECT | wc -l)
1818
if [[ ! "$count" ]]; then
1919
echo "vacuum drop table dry run summary, count:$count"
2020
exit 1
@@ -44,7 +44,7 @@ echo "INSERT INTO test_vacuum_drop.b VALUES (2)" | $BENDSQL_CLIENT_OUTPUT_NULL
4444

4545
echo "drop table test_vacuum_drop.b" | $BENDSQL_CLIENT_CONNECT
4646

47-
echo "vacuum drop table from test_vacuum_drop" | $BENDSQL_CLIENT_CONNECT > /dev/null
47+
echo "settings (fallback_to_legacy_vacuum=1) vacuum drop table from test_vacuum_drop" | $BENDSQL_CLIENT_CONNECT > /dev/null
4848

4949
echo "undrop table test_vacuum_drop.b" | $BENDSQL_CLIENT_CONNECT
5050

@@ -125,7 +125,7 @@ if [[ "$count" != "4" ]]; then
125125
echo "vacuum table, count:$count"
126126
exit 1
127127
fi
128-
count=$(echo "set data_retention_time_in_days=0; vacuum table test_vacuum_drop_4.c dry run summary" | $BENDSQL_CLIENT_CONNECT | wc -l)
128+
count=$(echo "set data_retention_time_in_days=0; settings (fallback_to_legacy_vacuum=1) vacuum table test_vacuum_drop_4.c dry run summary" | $BENDSQL_CLIENT_CONNECT | wc -l)
129129
if [[ "$count" != "1" ]]; then
130130
echo "vacuum table dry run summary, count:$count"
131131
exit 1

tests/suites/5_ee/01_vacuum/01_003_vacuum_table_only_orphans.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ ls -l /tmp/test_vacuum_table_only_orphans/"$PREFIX"/_sg/ | wc -l
5757
ls -l /tmp/test_vacuum_table_only_orphans/"$PREFIX"/_i_b_v2/ | wc -l
5858

5959

60-
stmt "set data_retention_time_in_days=0; vacuum table test_vacuum_table_only_orphans.a" > /dev/null
60+
stmt "set data_retention_time_in_days=0; settings (fallback_to_legacy_vacuum=1) vacuum table test_vacuum_table_only_orphans.a" > /dev/null
6161

6262
echo "after vacuum"
6363

tests/suites/5_ee/04_attach_read_only/04_0001_check_mutations.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ echo "CREATE INVERTED INDEX IF NOT EXISTS idx1 ON test_attach_only.test_json_rea
2020
echo "vacuum table"
2121

2222
echo "vacuum table should fail"
23-
echo "VACUUM TABLE test_attach_only.test_json_read_only;" | $BENDSQL_CLIENT_CONNECT
23+
echo "settings (fallback_to_legacy_vacuum=1) VACUUM TABLE test_attach_only.test_json_read_only;" | $BENDSQL_CLIENT_CONNECT
2424

2525
echo "vacuum drop table from db should not include the read_only attach table"
2626
# drop & vacuum
2727
echo "drop table test_attach_only.test_json_read_only" | $BENDSQL_CLIENT_CONNECT
28-
echo "vacuum drop table from test_attach_only" | $BENDSQL_CLIENT_CONNECT > /dev/null
28+
echo "settings (fallback_to_legacy_vacuum=1) vacuum drop table from test_attach_only" | $BENDSQL_CLIENT_CONNECT > /dev/null
2929
# attach it back
3030
echo "attach table test_attach_only.test_json_read_only 's3://testbucket/data/$storage_prefix' connection=(access_key_id ='minioadmin' secret_access_key ='minioadmin' endpoint_url='${STORAGE_S3_ENDPOINT_URL}')" | $BENDSQL_CLIENT_CONNECT
3131
echo "expect table data still there"

0 commit comments

Comments
 (0)