Skip to content

Commit

Permalink
fix async tests, add repl_mon.feature launch
Browse files Browse the repository at this point in the history
  • Loading branch information
suetin committed May 29, 2024
1 parent 9e9a083 commit 7a878b3
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker-tests-8.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
- 'VERSION=8.0 GODOG_FEATURE=readonly_filesystem.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=recovery.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=repair.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=repl_mon.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=statefile.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=switchover_from.feature make test'
- 'VERSION=8.0 GODOG_FEATURE=switchover_to.feature make test'
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/docker-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ jobs:
- 'GODOG_FEATURE=priority.feature make test'
- 'GODOG_FEATURE=readonly_filesystem.feature make test'
- 'GODOG_FEATURE=recovery.feature make test'
- 'GODOG_FEATURE=repair.feature make test'
- 'GODOG_FEATURE=statefile.feature make test'
- 'GODOG_FEATURE=repair.feature make test'
- 'GODOG_FEATURE=repl_mon.feature make test'
- 'GODOG_FEATURE=statefile.feature make test'
- 'GODOG_FEATURE=switchover_from.feature make test'
- 'GODOG_FEATURE=switchover_to.feature make test'
- 'GODOG_FEATURE=zk_failure.feature make test'
Expand Down
10 changes: 5 additions & 5 deletions tests/features/async_setting.feature
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Feature: mysync async mode tests
"""
MYSYNC_SEMISYNC=false
MYSYNC_ASYNC=true
ASYNC_ALLOWED_LAG=50
ASYNC_ALLOWED_LAG=60
MYSYNC_REPLICATION_LAG_QUERY="SELECT UNIX_TIMESTAMP(CURRENT_TIMESTAMP(3)) - UNIX_TIMESTAMP(ts) AS Seconds_Behind_Master FROM mysql.mysync_repl_mon"
MYSYNC_FAILOVER=true
MYSYNC_FAILOVER_DELAY=0s
Expand Down Expand Up @@ -135,16 +135,16 @@ Feature: mysync async mode tests
And I run SQL on mysql host "mysql2"
"""
STOP REPLICA FOR CHANNEL '';
CHANGE REPLICATION SOURCE TO SOURCE_DELAY = 60;
CHANGE REPLICATION SOURCE TO SOURCE_DELAY = 90;
START REPLICA FOR CHANNEL '';
"""
And I run SQL on mysql host "mysql3"
"""
STOP REPLICA FOR CHANNEL '';
CHANGE REPLICATION SOURCE TO SOURCE_DELAY = 90;
CHANGE REPLICATION SOURCE TO SOURCE_DELAY = 120;
START REPLICA FOR CHANNEL '';
"""
And I wait for "120" seconds
And I wait for "150" seconds
And I run SQL on mysql host "mysql1"
"""
INSERT INTO mysql.test_table1 VALUES ("D"), ("E"), ("F")
Expand Down Expand Up @@ -191,7 +191,7 @@ Feature: mysync async mode tests
"""
[{"val":"A,B,C"}]
"""
And I wait for "120" seconds
And I wait for "150" seconds
When I run SQL on mysql host "mysql3"
"""
SELECT GROUP_CONCAT(value) as val from (SELECT value from mysql.test_table1 order by value) as t
Expand Down
17 changes: 16 additions & 1 deletion tests/features/repl_mon.feature
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ Feature: repl_mon tests
"""
[{"res":1}]
"""
And I run SQL on mysql host "mysql2" expecting error on number "1146"
"""
SELECT ts FROM mysql.mysync_repl_mon
"""
And I run SQL on mysql host "mysql3" expecting error on number "1146"
"""
SELECT ts FROM mysql.mysync_repl_mon
"""

Scenario: repl_mon disabled
Given cluster environment is
Expand Down Expand Up @@ -54,4 +62,11 @@ Feature: repl_mon tests
"""
[{"res":0}]
"""

And I run SQL on mysql host "mysql2" expecting error on number "1146"
"""
SELECT ts FROM mysql.mysync_repl_mon
"""
And I run SQL on mysql host "mysql3" expecting error on number "1146"
"""
SELECT ts FROM mysql.mysync_repl_mon
"""

0 comments on commit 7a878b3

Please sign in to comment.