diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-03-08 17:01:49 -0700 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-03-08 17:04:02 -0700 |
commit | 57376f090503d7ef5bc38f138e58e64bdea284a3 (patch) | |
tree | e215bb0cf8df72a53b662ff222c24a973e7faac3 /functional_test.go | |
parent | Add benchmarks. (diff) | |
download | dedo-57376f090503d7ef5bc38f138e58e64bdea284a3.tar.gz dedo-57376f090503d7ef5bc38f138e58e64bdea284a3.tar.xz |
Rename Transaction to Tx.
I changed the Transaction/RWTransaction types to Tx/RWTx, respectively. This makes the naming
more consistent with other packages such as database/sql. The txnid is changed to txid as well.
Diffstat (limited to 'functional_test.go')
-rw-r--r-- | functional_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/functional_test.go b/functional_test.go index 61f09bc..20af8fc 100644 --- a/functional_test.go +++ b/functional_test.go @@ -12,7 +12,7 @@ import ( ) // Ensure that multiple threads can use the DB without race detector errors. -func TestParallelTransactions(t *testing.T) { +func TestParallelTxs(t *testing.T) { var mutex sync.RWMutex err := quick.Check(func(numReaders, batchSize uint, items testdata) bool { @@ -45,7 +45,7 @@ func TestParallelTransactions(t *testing.T) { go func() { mutex.RLock() local := current - txn, err := db.Transaction() + txn, err := db.Tx() mutex.RUnlock() if err == ErrDatabaseNotOpen { wg.Done() @@ -83,7 +83,7 @@ func TestParallelTransactions(t *testing.T) { pending = pending[currentBatchSize:] // Start write transaction. - txn, err := db.RWTransaction() + txn, err := db.RWTx() if !assert.NoError(t, err) { t.FailNow() } |