diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-02-21 17:14:56 -0700 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-02-21 22:57:50 -0700 |
commit | 1ad2b99f281d587b767b36f886401e81d17915a9 (patch) | |
tree | 7b46bfc96689af14938a9f93aab732e3e46ee709 /functional_test.go | |
parent | Merge pull request #49 from benbjohnson/stat (diff) | |
download | dedo-1ad2b99f281d587b767b36f886401e81d17915a9.tar.gz dedo-1ad2b99f281d587b767b36f886401e81d17915a9.tar.xz |
Refactor Transaction/Bucket API.
Diffstat (limited to 'functional_test.go')
-rw-r--r-- | functional_test.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/functional_test.go b/functional_test.go index f7c3c3a..acd2f4a 100644 --- a/functional_test.go +++ b/functional_test.go @@ -56,15 +56,15 @@ func TestParallelTransactions(t *testing.T) { // Verify all data is in for local data list. for _, item := range local { - value, err := txn.Get("widgets", item.Key) + value := txn.Bucket("widgets").Get(item.Key) if !assert.NoError(t, err) || !assert.Equal(t, value, item.Value) { - txn.Close() + txn.Rollback() wg.Done() t.FailNow() } } - txn.Close() + txn.Rollback() wg.Done() <-readers }() @@ -89,8 +89,9 @@ func TestParallelTransactions(t *testing.T) { } // Insert whole batch. + b := txn.Bucket("widgets") for _, item := range batchItems { - err := txn.Put("widgets", item.Key, item.Value) + err := b.Put(item.Key, item.Value) if !assert.NoError(t, err) { t.FailNow() } |