Fix data race in bulk import tests (#24897)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
1a12faaaae
Коммит
4408ece955
@@ -54,6 +54,12 @@ func TestContext(t testing.TB) *Context {
|
||||
return EmptyContext(logger)
|
||||
}
|
||||
|
||||
// Clone creates a shallow copy of Context, allowing clones to apply per-request changes.
|
||||
func (c *Context) Clone() CTX {
|
||||
cCopy := *c
|
||||
return &cCopy
|
||||
}
|
||||
|
||||
func (c *Context) T(translationID string, args ...any) string {
|
||||
return c.t(translationID, args...)
|
||||
}
|
||||
@@ -125,6 +131,7 @@ func (c *Context) Logger() mlog.LoggerIFace {
|
||||
}
|
||||
|
||||
type CTX interface {
|
||||
Clone() CTX
|
||||
T(string, ...interface{}) string
|
||||
Session() *model.Session
|
||||
RequestId() string
|
||||
|
||||
Ссылка в новой задаче
Block a user