forked from forgejo/forgejo
Fix SQLite concurrency problems by using BEGIN IMMEDIATE (#10368)
* Test locking immediate for SQLite3 * fix url field separator Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
parent
7ffc2427da
commit
4a2d23981d
3 changed files with 3 additions and 3 deletions
|
@ -88,7 +88,7 @@ func MainTest(m *testing.M, pathToGiteaRoot string) {
|
|||
// CreateTestEngine creates a memory database and loads the fixture data from fixturesDir
|
||||
func CreateTestEngine(fixturesDir string) error {
|
||||
var err error
|
||||
x, err = xorm.NewEngine("sqlite3", "file::memory:?cache=shared")
|
||||
x, err = xorm.NewEngine("sqlite3", "file::memory:?cache=shared&_txlock=immediate")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue