aboutsummaryrefslogtreecommitdiff
path: root/functional_test.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-02-21 17:14:56 -0700
committerBen Johnson <benbjohnson@yahoo.com>2014-02-21 22:57:50 -0700
commit1ad2b99f281d587b767b36f886401e81d17915a9 (patch)
tree7b46bfc96689af14938a9f93aab732e3e46ee709 /functional_test.go
parentMerge pull request #49 from benbjohnson/stat (diff)
downloaddedo-1ad2b99f281d587b767b36f886401e81d17915a9.tar.gz
dedo-1ad2b99f281d587b767b36f886401e81d17915a9.tar.xz
Refactor Transaction/Bucket API.
Diffstat (limited to 'functional_test.go')
-rw-r--r--functional_test.go9
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()
}