Added test environment for mssql (#4282)
* Added test environment for m$sql * Added template for test environment for m$sql * Fix password * Fix password (again) * Fix password (again again) * Fix db * Ci trigger (Looking at you drone....) * Ci trigger (Looking at you drone....) * Ci trigger (Looking at you drone....) * Ci trigger (Looking at you drone....) * Create master database for mssql integration tests Signed-off-by: Jonas Franz <info@jonasfranz.software> * Create database only if master do not exist Signed-off-by: Jonas Franz <info@jonasfranz.software> * Fix mssql integration tests by using custom database "gitea" Signed-off-by: Jonas Franz <info@jonasfranz.software> * Moved defer * bump xorm * updated xorm * Fixed build
This commit is contained in:
parent
b1f3685015
commit
6db7dbd333
27 changed files with 383 additions and 66 deletions
10
vendor/github.com/go-xorm/xorm/engine_group.go
generated
vendored
10
vendor/github.com/go-xorm/xorm/engine_group.go
generated
vendored
|
@ -5,6 +5,8 @@
|
|||
package xorm
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/go-xorm/core"
|
||||
)
|
||||
|
||||
|
@ -99,6 +101,14 @@ func (eg *EngineGroup) SetColumnMapper(mapper core.IMapper) {
|
|||
}
|
||||
}
|
||||
|
||||
// SetConnMaxLifetime sets the maximum amount of time a connection may be reused.
|
||||
func (eg *EngineGroup) SetConnMaxLifetime(d time.Duration) {
|
||||
eg.Engine.SetConnMaxLifetime(d)
|
||||
for i := 0; i < len(eg.slaves); i++ {
|
||||
eg.slaves[i].SetConnMaxLifetime(d)
|
||||
}
|
||||
}
|
||||
|
||||
// SetDefaultCacher set the default cacher
|
||||
func (eg *EngineGroup) SetDefaultCacher(cacher core.Cacher) {
|
||||
eg.Engine.SetDefaultCacher(cacher)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue