Skip to content

Commit

Permalink
[fix](test) fix unstable test after some test migration (#46834)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

fix some unstable test cases
  • Loading branch information
morningman authored and Your Name committed Jan 13, 2025
1 parent 842196a commit 7db6754
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 44 deletions.
72 changes: 36 additions & 36 deletions regression-test/data/external_table_p0/jdbc/test_jdbc_query_tvf.out
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
-- This file is automatically generated. You should know what you did if you want to edit this
-- !sql --
bigint BIGINT Yes true \N NONE
bigint_u LARGEINT Yes true \N NONE
binary TEXT Yes true \N NONE
bit TEXT Yes true \N NONE
blob TEXT Yes true \N NONE
boolean TINYINT Yes true \N NONE
char CHAR(6) Yes true \N NONE
date DATE Yes true \N NONE
datetime DATETIME Yes true \N NONE
decimal DECIMAL(12, 4) Yes true \N NONE
decimal_u DECIMAL(19, 5) Yes true \N NONE
double DOUBLE Yes true \N NONE
double_u DOUBLE Yes true \N NONE
enum CHAR(6) Yes true \N NONE
float FLOAT Yes true \N NONE
float_u FLOAT Yes true \N NONE
int INT Yes true \N NONE
int_u BIGINT Yes true \N NONE
json TEXT Yes true \N NONE
mediumint INT Yes true \N NONE
mediumint_u INT Yes true \N NONE
set CHAR(6) Yes true \N NONE
smallint SMALLINT Yes true \N NONE
smallint_u INT Yes true \N NONE
text TEXT Yes true \N NONE
time TEXT Yes true \N NONE
timestamp DATETIME(4) Yes true \N NONE
tinyint TINYINT Yes true \N NONE
tinyint_u SMALLINT Yes true \N NONE
varbinary TEXT Yes true \N NONE
varchar VARCHAR(10) Yes true \N NONE
year SMALLINT Yes true \N NONE
bigint bigint Yes true \N NONE
bigint_u largeint Yes true \N NONE
binary text Yes true \N NONE
bit text Yes true \N NONE
blob text Yes true \N NONE
boolean tinyint Yes true \N NONE
char char(5) Yes true \N NONE
date date Yes true \N NONE
datetime datetime Yes true \N NONE
decimal decimal(12,4) Yes true \N NONE
decimal_u decimal(19,5) Yes true \N NONE
double double Yes true \N NONE
double_u double Yes true \N NONE
enum char(6) Yes true \N NONE
float float Yes true \N NONE
float_u float Yes true \N NONE
int int Yes true \N NONE
int_u bigint Yes true \N NONE
json text Yes true \N NONE
mediumint int Yes true \N NONE
mediumint_u int Yes true \N NONE
set char(23) Yes true \N NONE
smallint smallint Yes true \N NONE
smallint_u int Yes true \N NONE
text text Yes true \N NONE
time text Yes true \N NONE
timestamp datetime(4) Yes true \N NONE
tinyint tinyint Yes true \N NONE
tinyint_u smallint Yes true \N NONE
varbinary text Yes true \N NONE
varchar varchar(10) Yes true \N NONE
year smallint Yes true \N NONE

-- !sql --
\N 302 \N 502 602 4.14159 \N 6.14159 \N -124 -302 2013 -402 -502 -602 \N 2012-10-26T02:08:39.345700 2013-10-26T08:09:18 -5.14145 \N -7.1400 row2 \N 09:11:09.567 text2 0xE86F6C6C6F20576F726C67 \N \N 0x2F \N 0x88656C6C9F Value3
201 301 401 501 601 3.14159 4.1415926 5.14159 1 -123 -301 2012 -401 -501 -601 2012-10-30 2012-10-25T12:05:36.345700 2012-10-25T08:08:08 -4.14145 -5.1400000001 -6.1400 row1 line1 09:09:09.567 text1 0x48656C6C6F20576F726C64 {"age":30, "city":"London", "name":"Alice"} Option1,Option3 0x2A 0x48656C6C6F00000000000000 0x48656C6C6F Value2
202 302 402 502 602 4.14159 5.1415926 6.14159 0 -124 -302 2013 -402 -502 -602 2012-11-01 2012-10-26T02:08:39.345700 2013-10-26T08:09:18 -5.14145 -6.1400000001 -7.1400 row2 line2 09:11:09.567 text2 0xE86F6C6C6F20576F726C67 {"age":18, "city":"ChongQing", "name":"Gaoxin"} Option1,Option2 0x2F 0x58676C6C6F00000000000000 0x88656C6C9F Value3
203 303 403 503 603 7.14159 8.1415926 9.14159 0 \N -402 2017 -602 -902 -1102 2012-11-02 \N 2013-10-27T08:11:18 -5.14145 -6.1400000000001 -7.1400 row3 line3 09:11:09.567 text3 0xE86F6C6C6F20576F726C67 {"age":24, "city":"ChongQing", "name":"ChenQi"} Option2 0x2F 0x58676C6C6F00000000000000 \N Value1
\N 302 \N 502 602 4.14159 \N 6.14159 \N -124 -302 2013 -402 -502 -602 \N 2012-10-26T02:08:39.345700 2013-10-26T08:09:18 -5.14145 \N -7.1400 row2 \N 09:11:09.5678 text2 0xE86F6C6C6F20576F726C67 \N \N 0x2F \N 0x88656C6C9F Value3
201 301 401 501 601 3.14159 4.1415926 5.14159 1 -123 -301 2012 -401 -501 -601 2012-10-30 2012-10-25T12:05:36.345700 2012-10-25T08:08:08 -4.14145 -5.1400000001 -6.1400 row1 line1 09:09:09.5678 text1 0x48656C6C6F20576F726C64 {"age": 30, "city": "London", "name": "Alice"} Option1,Option3 0x2A 0x48656C6C6F00000000000000 0x48656C6C6F Value2
202 302 402 502 602 4.14159 5.1415926 6.14159 0 -124 -302 2013 -402 -502 -602 2012-11-01 2012-10-26T02:08:39.345700 2013-10-26T08:09:18 -5.14145 -6.1400000001 -7.1400 row2 line2 09:11:09.5678 text2 0xE86F6C6C6F20576F726C67 {"age": 18, "city": "ChongQing", "name": "Gaoxin"} Option1,Option2 0x2F 0x58676C6C6F00000000000000 0x88656C6C9F Value3
203 303 403 503 603 7.14159 8.1415926 9.14159 0 \N -402 2017 -602 -902 -1102 2012-11-02 \N 2013-10-27T08:11:18 -5.14145 -6.1400000000001 -7.1400 row3 line3 09:11:09.5678 text3 0xE86F6C6C6F20576F726C67 {"age": 24, "city": "ChongQing", "name": "ChenQi"} Option2 0x2F 0x58676C6C6F00000000000000 \N Value1

-- !sql --
4
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
-- This file is automatically generated. You should know what you did if you want to edit this
-- !test --
2 1 3
3 5 6
4 5 6
6 \N 6

6 changes: 3 additions & 3 deletions regression-test/suites/auth_p0/test_query_tvf_auth.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
// specific language governing permissions and limitations
// under the License.

suite("test_jdbc_query_tvf","p0,auth") {
String suiteName = "test_jdbc_query_tvf"
suite("test_query_tvf_auth", "p0,auth,external,external_docker") {
String suiteName = "test_query_tvf_auth"
String enabled = context.config.otherConfigs.get("enableJdbcTest")
String externalEnvIp = context.config.otherConfigs.get("externalEnvIp")
String s3_endpoint = getS3Endpoint()
Expand Down Expand Up @@ -58,7 +58,7 @@ suite("test_jdbc_query_tvf","p0,auth") {
sql """
select * from query('catalog' = '${catalog_name}', 'query' = 'select * from doris_test.all_types');
"""
exception "denied"
exception "has no privilege"
}
}
sql """grant select_priv on ${catalog_name}.*.* to ${dorisuser}"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
// specific language governing permissions and limitations
// under the License.

suite("test_switch_catalog_and_delete_internal", "p0,external") {
suite("test_switch_catalog_and_delete_internal", "p0,external,external_docker") {
String enabled = context.config.otherConfigs.get("enableJdbcTest")
String externalEnvIp = context.config.otherConfigs.get("externalEnvIp")
String mysql_port = context.config.otherConfigs.get("mysql_57_port");
String s3_endpoint = getS3Endpoint()
String bucket = getS3BucketName()
String driver_url = "https://${bucket}.${s3_endpoint}/regression/jdbc_driver/mysql-connector-java-8.0.25.jar"
String db = context.config.getDbNameByFile(context.file)
if (enabled != null && enabled.equalsIgnoreCase("true")) {
// 0.create internal db and table
String db = context.config.getDbNameByFile(new File(context.file))
sql "drop table if exists test_switch_catalog_and_delete_internal"
sql """
create table test_switch_catalog_and_delete_internal(pk int, a int, b int) distributed by hash(pk) buckets 10
Expand All @@ -50,9 +50,9 @@ suite("test_switch_catalog_and_delete_internal", "p0,external") {
sql "switch test_switch_catalog_and_delete_internal_catalog"
sql "refresh catalog test_switch_catalog_and_delete_internal_catalog"
// 3.delete table
sql "delete from internal.${db}.test_switch_catalog_and_delete_internal;"
sql "delete from internal.${db}.test_switch_catalog_and_delete_internal where pk < 2;"
// 4.select table
qt_test "select * from internal.maldb.test_switch_catalog_and_delete_internal;"
qt_test "select * from internal.${db}.test_switch_catalog_and_delete_internal order by pk;"
}

}
}

0 comments on commit 7db6754

Please sign in to comment.