Skip to content

Conversation

@phbnf
Copy link
Contributor

@phbnf phbnf commented Dec 8, 2025

Unfortunately, the test is still flaky.

Undoes #821.

@phbnf phbnf requested review from AlCutter and roger2hk December 8, 2025 15:14
@phbnf phbnf marked this pull request as ready for review December 8, 2025 15:15
@phbnf phbnf requested a review from a team as a code owner December 8, 2025 15:15
@phbnf phbnf changed the title Optional mysql test Make mysql test optional again Dec 8, 2025
@phbnf phbnf merged commit 3b422a8 into transparency-dev:main Dec 8, 2025
20 of 21 checks passed
@roger2hk
Copy link
Contributor

roger2hk commented Dec 8, 2025

This PR doesn't actually make the MySQL test optional. The test will still run when there is a MySQL database available.

db, err := sql.Open("mysql", *mysqlURI)
if err != nil {
if *isMySQLTestOptional {
klog.Warning("MySQL not available, skipping all MySQL storage tests")
return
}
klog.Fatalf("Failed to open MySQL test db: %v", err)
}
defer func() {
if err := db.Close(); err != nil {
klog.Warningf("Failed to close MySQL database: %v", err)
}
}()
if err := db.PingContext(ctx); err != nil {
if *isMySQLTestOptional {
klog.Warning("MySQL not available, skipping all MySQL storage tests")
return
}
klog.Fatalf("Failed to ping MySQL test db: %v", err)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants