Skip to content

Commit

Permalink
Allow non standard FK keys for stress tests
Browse files Browse the repository at this point in the history
Signed-off-by: Dirkjan Bussink <[email protected]>
  • Loading branch information
dbussink committed Oct 4, 2024
1 parent 0a919c4 commit c945186
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ jobs:
set -exo pipefail
cat <<-EOF>>./config/mycnf/mysql84.cnf
restrict_fk_on_non_standard_key=OFF
EOF
# run the tests however you normally do, then produce a JUnit XML file
eatmydata -- go run test.go -docker=false -follow -shard vtgate_foreignkey_stress | tee -a output.txt | go-junit-report -set-exit-code > report.xml
Expand Down
4 changes: 4 additions & 0 deletions test/ci_workflow_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ type clusterTest struct {
EnableBinlogTransactionCompression bool
PartialKeyspace bool
Cores16 bool
AllowFKNonStandardKey bool
}

type vitessTesterTest struct {
Expand Down Expand Up @@ -290,6 +291,9 @@ func generateClusterWorkflows(list []string, tpl string) {
if strings.HasPrefix(cluster, "vreplication") || strings.HasSuffix(cluster, "heavy") {
test.LimitResourceUsage = true
}
if strings.Contains(cluster, "foreignkey") {
test.AllowFKNonStandardKey = true
}
if strings.Contains(cluster, "vrepl") {
test.EnableBinlogTransactionCompression = true
}
Expand Down
6 changes: 6 additions & 0 deletions test/templates/cluster_endtoend_test.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,12 @@ jobs:
EOF
{{end}}

{{if .AllowFKNonStandardKey }}
cat <<-EOF>>./config/mycnf/mysql84.cnf
restrict_fk_on_non_standard_key=OFF
EOF
{{end}}

{{if .EnableBinlogTransactionCompression}}
cat <<-EOF>>./config/mycnf/mysql84.cnf
binlog-transaction-compression=ON
Expand Down

0 comments on commit c945186

Please sign in to comment.