Skip to content
This repository was archived by the owner on Aug 21, 2023. It is now read-only.

Commit 324c49d

Browse files
authored
tests: fix sync_diff configs for CI (#380) (#383)
1 parent 7db623e commit 324c49d

File tree

7 files changed

+65
-127
lines changed

7 files changed

+65
-127
lines changed

tests/_utils/check_sync_diff

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@ conf=$1
99
check_time=${2-10}
1010

1111
LOG=$DUMPLING_OUTPUT_DIR/sync_diff_inspector.log
12+
OUTPUT_DIR=/tmp/dumpling_test_result/output
13+
14+
mkdir -p OUTPUT_DIR=/tmp/dumpling_test_result
1215

1316
i=0
1417
while [ $i -lt $check_time ]
1518
do
19+
rm -rf $OUTPUT_DIR
1620
bin/sync_diff_inspector --config=$conf >> $LOG 2>&1
1721
ret=$?
1822
if [ "$ret" == 0 ]; then

tests/all_generate_column/conf/diff_config.toml

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,28 @@
11
# diff Configuration.
22

3-
log-level = "info"
4-
5-
chunk-size = 1000
6-
73
check-thread-count = 4
84

9-
sample-percent = 100
5+
export-fix-sql = true
106

11-
use-checksum = true
7+
check-struct-only = false
128

13-
fix-sql-file = "fix.sql"
9+
[task]
10+
output-dir = "/tmp/dumpling_test_result/output"
1411

15-
# tables need to check.
16-
[[check-tables]]
17-
schema = "all_generate_column"
18-
tables = ["~t.*"]
12+
source-instances = ["mysql1"]
1913

20-
[[table-config]]
21-
schema = "all_generate_column"
22-
table = "t"
14+
target-instance = "tidb0"
2315

24-
[[table-config.source-tables]]
25-
instance-id = "source-1"
26-
schema = "all_generate_column"
27-
table = "t"
16+
target-check-tables = ["all_generate_column.t"]
2817

29-
[[source-db]]
18+
[data-sources]
19+
[data-sources.mysql1]
3020
host = "127.0.0.1"
3121
port = 3306
3222
user = "root"
3323
password = ""
34-
instance-id = "source-1"
3524

36-
[target-db]
25+
[data-sources.tidb0]
3726
host = "127.0.0.1"
3827
port = 4000
3928
user = "root"

tests/e2e/conf/diff_config.toml

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,28 @@
11
# diff Configuration.
22

3-
log-level = "info"
4-
5-
chunk-size = 1000
6-
73
check-thread-count = 4
84

9-
sample-percent = 100
5+
export-fix-sql = true
106

11-
use-checksum = true
7+
check-struct-only = false
128

13-
fix-sql-file = "fix.sql"
9+
[task]
10+
output-dir = "/tmp/dumpling_test_result/output"
1411

15-
# tables need to check.
16-
[[check-tables]]
17-
schema = "e2e"
18-
tables = ["~t.*"]
12+
source-instances = ["mysql1"]
1913

20-
[[table-config]]
21-
schema = "e2e"
22-
table = "t"
14+
target-instance = "tidb0"
2315

24-
[[table-config.source-tables]]
25-
instance-id = "source-1"
26-
schema = "e2e"
27-
table = "t"
16+
target-check-tables = ["e2e.t"]
2817

29-
[[source-db]]
18+
[data-sources]
19+
[data-sources.mysql1]
3020
host = "127.0.0.1"
3121
port = 3306
3222
user = "root"
3323
password = ""
34-
instance-id = "source-1"
3524

36-
[target-db]
25+
[data-sources.tidb0]
3726
host = "127.0.0.1"
3827
port = 4000
3928
user = "root"

tests/e2e_csv/conf/diff_config.toml

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,28 @@
11
# diff Configuration.
22

3-
log-level = "info"
4-
5-
chunk-size = 1000
6-
73
check-thread-count = 4
84

9-
sample-percent = 100
10-
11-
use-checksum = true
12-
13-
fix-sql-file = "fix.sql"
5+
export-fix-sql = true
146

15-
# tables need to check.
16-
[[check-tables]]
17-
schema = "e2e_csv"
18-
tables = ["escape", "t"]
7+
check-struct-only = false
198

20-
[[table-config]]
21-
schema = "e2e_csv"
22-
table = "t"
9+
[task]
10+
output-dir = "/tmp/dumpling_test_result/output"
2311

24-
[[table-config.source-tables]]
25-
instance-id = "source-1"
26-
schema = "e2e_csv"
27-
table = "t"
12+
source-instances = ["mysql1"]
2813

29-
[[table-config]]
30-
schema = "e2e_csv"
31-
table = "escape"
14+
target-instance = "tidb0"
3215

33-
[[table-config.source-tables]]
34-
instance-id = "source-1"
35-
schema = "e2e_csv"
36-
table = "escape"
16+
target-check-tables = ["e2e_csv.escape", "e2e_csv.t"]
3717

38-
[[source-db]]
18+
[data-sources]
19+
[data-sources.mysql1]
3920
host = "127.0.0.1"
4021
port = 3306
4122
user = "root"
4223
password = ""
43-
instance-id = "source-1"
4424

45-
[target-db]
25+
[data-sources.tidb0]
4626
host = "127.0.0.1"
4727
port = 4000
4828
user = "root"

tests/ignore_generate_column/conf/diff_config.toml

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,28 @@
11
# diff Configuration.
22

3-
log-level = "info"
4-
5-
chunk-size = 1000
6-
73
check-thread-count = 4
84

9-
sample-percent = 100
5+
export-fix-sql = true
106

11-
use-checksum = true
7+
check-struct-only = false
128

13-
fix-sql-file = "fix.sql"
9+
[task]
10+
output-dir = "/tmp/dumpling_test_result/output"
1411

15-
# tables need to check.
16-
[[check-tables]]
17-
schema = "ignore_generate"
18-
tables = ["~t.*"]
12+
source-instances = ["mysql1"]
1913

20-
[[table-config]]
21-
schema = "ignore_generate"
22-
table = "t"
14+
target-instance = "tidb0"
2315

24-
[[table-config.source-tables]]
25-
instance-id = "source-1"
26-
schema = "ignore_generate"
27-
table = "t"
16+
target-check-tables = ["ignore_generate.t"]
2817

29-
[[source-db]]
18+
[data-sources]
19+
[data-sources.mysql1]
3020
host = "127.0.0.1"
3121
port = 3306
3222
user = "root"
3323
password = ""
34-
instance-id = "source-1"
3524

36-
[target-db]
25+
[data-sources.tidb0]
3726
host = "127.0.0.1"
3827
port = 4000
3928
user = "root"

tests/rows/conf/diff_config.toml

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,28 @@
11
# diff Configuration.
22

3-
log-level = "info"
4-
5-
chunk-size = 1000
6-
73
check-thread-count = 4
84

9-
sample-percent = 100
5+
export-fix-sql = true
106

11-
use-checksum = true
7+
check-struct-only = false
128

13-
fix-sql-file = "fix.sql"
9+
[task]
10+
output-dir = "/tmp/dumpling_test_result/output"
1411

15-
# tables need to check.
16-
[[check-tables]]
17-
schema = "rows"
18-
tables = ["~t.*"]
12+
source-instances = ["mysql1"]
1913

20-
[[table-config]]
21-
schema = "rows"
22-
table = "t"
14+
target-instance = "tidb0"
2315

24-
[[table-config.source-tables]]
25-
instance-id = "source-1"
26-
schema = "rows"
27-
table = "t"
16+
target-check-tables = ["rows.t"]
2817

29-
[[source-db]]
18+
[data-sources]
19+
[data-sources.mysql1]
3020
host = "127.0.0.1"
3121
port = 3306
3222
user = "root"
3323
password = ""
34-
instance-id = "source-1"
3524

36-
[target-db]
25+
[data-sources.tidb0]
3726
host = "127.0.0.1"
3827
port = 4000
3928
user = "root"

tests/rows_extreme_int/conf/diff_config.toml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
11
# diff Configuration.
22

3-
log-level = "info"
3+
check-thread-count = 4
44

5-
chunk-size = 1000
5+
export-fix-sql = true
66

7-
check-thread-count = 4
7+
check-struct-only = false
88

9-
sample-percent = 100
9+
[task]
10+
output-dir = "/tmp/dumpling_test_result/output"
1011

11-
use-checksum = true
12+
source-instances = ["mysql1"]
1213

13-
fix-sql-file = "fix.sql"
14+
target-instance = "tidb0"
1415

15-
# tables need to check.
16-
[[check-tables]]
17-
schema = "rei"
18-
tables = ["~t.*"]
16+
target-check-tables = ["rei.t*"]
1917

20-
[[source-db]]
18+
[data-sources]
19+
[data-sources.mysql1]
2120
host = "127.0.0.1"
2221
port = 3306
2322
user = "root"
2423
password = ""
25-
instance-id = "source-1"
2624

27-
[target-db]
25+
[data-sources.tidb0]
2826
host = "127.0.0.1"
2927
port = 4000
3028
user = "root"

0 commit comments

Comments
 (0)