Fixed INSERT-SELECT deadlocks in tests

This commit is contained in:
Sergey Kurt 2017-04-28 23:58:17 +03:00
parent 7de817b111
commit a3442a5ab4

View file

@ -68,6 +68,9 @@ func (m *mssqlTester) sslMode(mode string) string {
func (m *mssqlTester) createTestDB() error { func (m *mssqlTester) createTestDB() error {
sql := fmt.Sprintf(` sql := fmt.Sprintf(`
CREATE DATABASE %s; CREATE DATABASE %s;
GO
ALTER DATABASE %[1]s
SET READ_COMMITTED_SNAPSHOT ON;
GO`, m.testDBName) GO`, m.testDBName)
return m.runCmd(sql, "sqlcmd", "-S", m.host, "-U", m.user, "-P", m.pass) return m.runCmd(sql, "sqlcmd", "-S", m.host, "-U", m.user, "-P", m.pass)
} }