diff options
author | guillep2k <18600385+guillep2k@users.noreply.github.com> | 2020-02-26 20:51:37 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-27 07:51:37 +0800 |
commit | 4a2d23981d39be8559757b54f0201adcba5496c3 (patch) | |
tree | df7a3847585ed389c7965c0f8752bb79f42bc457 /models | |
parent | 7ffc2427daad725e448abfa1828b10acdba1a02c (diff) | |
download | gitea-4a2d23981d39be8559757b54f0201adcba5496c3.tar.gz gitea-4a2d23981d39be8559757b54f0201adcba5496c3.zip |
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>
Diffstat (limited to 'models')
-rw-r--r-- | models/unit_tests.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/unit_tests.go b/models/unit_tests.go index b9f894af7c..b2c487ddcd 100644 --- a/models/unit_tests.go +++ b/models/unit_tests.go @@ -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 } |