mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Typos and FIXMEs
This commit is contained in:
parent
4576d0f802
commit
f7a2f0b937
2 changed files with 3 additions and 1 deletions
|
@ -104,9 +104,11 @@ func (db *Database) Set(fullPath, id string) (*Entity, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
defer conn.Close()
|
defer conn.Close()
|
||||||
|
// FIXME: is rollback implicit when closing the connection?
|
||||||
rollback := func() {
|
rollback := func() {
|
||||||
conn.Exec("ROLLBACK")
|
conn.Exec("ROLLBACK")
|
||||||
}
|
}
|
||||||
|
// FIXME: use exclusive transactions to avoid race conditions
|
||||||
if _, err := conn.Exec("BEGIN"); err != nil {
|
if _, err := conn.Exec("BEGIN"); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ func destroyTestDb(db *Database) {
|
||||||
func TestNewDatabase(t *testing.T) {
|
func TestNewDatabase(t *testing.T) {
|
||||||
db := newTestDb(t)
|
db := newTestDb(t)
|
||||||
if db == nil {
|
if db == nil {
|
||||||
t.Fatal("Datbase should not be nil")
|
t.Fatal("Database should not be nil")
|
||||||
}
|
}
|
||||||
defer destroyTestDb(db)
|
defer destroyTestDb(db)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue