Typos and FIXMEs

Upstream-commit: f7a2f0b93746d33da42b892abc6d5e0a05741321
Component: engine
This commit is contained in:
Solomon Hykes
2013-10-09 19:45:45 -07:00
committed by Victor Vieux
parent a116492e55
commit aba25bde9e
2 changed files with 3 additions and 1 deletions

View File

@ -104,9 +104,11 @@ func (db *Database) Set(fullPath, id string) (*Entity, error) {
return nil, err
}
defer conn.Close()
// FIXME: is rollback implicit when closing the connection?
rollback := func() {
conn.Exec("ROLLBACK")
}
// FIXME: use exclusive transactions to avoid race conditions
if _, err := conn.Exec("BEGIN"); err != nil {
return nil, err
}

View File

@ -22,7 +22,7 @@ func destroyTestDb(db *Database) {
func TestNewDatabase(t *testing.T) {
db := newTestDb(t)
if db == nil {
t.Fatal("Datbase should not be nil")
t.Fatal("Database should not be nil")
}
defer destroyTestDb(db)
}