Skip to content

Commit

Permalink
Fix benchmarks. Fixes #219
Browse files Browse the repository at this point in the history
  • Loading branch information
asdine committed Dec 22, 2018
1 parent 62b71d0 commit f4de09a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func BenchmarkOneByID(b *testing.B) {
defer cleanup()

type User struct {
ID int
ID int `storm:"increment"`
Name string `storm:"index"`
age int
DateOfBirth time.Time `storm:"index"`
Expand Down
6 changes: 3 additions & 3 deletions store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/asdine/storm/codec/gob"
"github.com/asdine/storm/codec/json"
"github.com/asdine/storm/q"
bolt "go.etcd.io/bbolt"
"github.com/stretchr/testify/require"
bolt "go.etcd.io/bbolt"
)

func TestInit(t *testing.T) {
Expand Down Expand Up @@ -423,11 +423,11 @@ func TestSaveWithBatch(t *testing.T) {

for i := 0; i < 5; i++ {
wg.Add(1)
go func() {
go func(i int) {
defer wg.Done()
err := db.Save(&User{ID: i + 1, Name: "John"})
require.NoError(t, err)
}()
}(i)
}

wg.Wait()
Expand Down
2 changes: 1 addition & 1 deletion structs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ type ClassicInline struct {
}

type User struct {
ID int `storm:"id"`
ID int `storm:"id,increment"`
Name string `storm:"index"`
Age int `storm:"index,increment"`
DateOfBirth time.Time `storm:"index"`
Expand Down

0 comments on commit f4de09a

Please sign in to comment.