From 1ad2b99f281d587b767b36f886401e81d17915a9 Mon Sep 17 00:00:00 2001 From: Ben Johnson Date: Fri, 21 Feb 2014 17:14:56 -0700 Subject: Refactor Transaction/Bucket API. --- functional_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'functional_test.go') 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() } -- cgit v1.2.3