mirror of
https://github.com/mattermost/mattermost.git
synced 2026-08-09 04:28:29 -05:00
Disable morph logging in NewTestPool (#36308)
Every test binary that uses TestPool builds 16 stores in parallel, each running the full migration set. Without DisableMorphLogging() the morph debug stream from each store flows through to the test logger (which is configured at LvlTrace), producing tens of thousands of "migrating (up)" lines per shard — amplified further on shards that re-run flaky tests, since every re-run spawns a fresh TestMain and a fresh pool. Migration failures are still surfaced: engine.ApplyAll returns the error, sqlstore.New wraps it as "failed to apply database migrations", and both NewTestPool callers panic on a non-nil result. Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
co-authored by
Mattermost Build
parent
e70e8c0e9e
commit
cad4a4509c
@@ -38,7 +38,7 @@ func NewTestPool(logger mlog.LoggerIFace, driverName string, poolSize int) (*Tes
|
||||
settings := storetest.MakeSqlSettings(driverName)
|
||||
sqlStore, err := New(*settings, logger, nil, WithFeatureFlags(func() *model.FeatureFlags {
|
||||
return &model.FeatureFlags{CJKSearch: true}
|
||||
}))
|
||||
}), DisableMorphLogging())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user