good morning!!!!

Skip to content
Snippets Groups Projects
Commit 2235a71d authored by José Carlos Nieto's avatar José Carlos Nieto
Browse files

Adding missing calls to tx.Close().

parent 523bc034
Branches
Tags
No related merge requests found
...@@ -324,6 +324,7 @@ func BenchmarkUpperAppendTransaction(b *testing.B) { ...@@ -324,6 +324,7 @@ func BenchmarkUpperAppendTransaction(b *testing.B) {
if tx, err = sess.Transaction(); err != nil { if tx, err = sess.Transaction(); err != nil {
b.Fatal(err) b.Fatal(err)
} }
defer tx.Close()
var artist db.Collection var artist db.Collection
if artist, err = tx.Collection("artist"); err != nil { if artist, err = tx.Collection("artist"); err != nil {
...@@ -366,6 +367,7 @@ func BenchmarkUpperAppendTransactionWithMap(b *testing.B) { ...@@ -366,6 +367,7 @@ func BenchmarkUpperAppendTransactionWithMap(b *testing.B) {
if tx, err = sess.Transaction(); err != nil { if tx, err = sess.Transaction(); err != nil {
b.Fatal(err) b.Fatal(err)
} }
defer tx.Close()
var artist db.Collection var artist db.Collection
if artist, err = tx.Collection("artist"); err != nil { if artist, err = tx.Collection("artist"); err != nil {
...@@ -766,6 +768,8 @@ func BenchmarkUpperCommitManyTransactions(b *testing.B) { ...@@ -766,6 +768,8 @@ func BenchmarkUpperCommitManyTransactions(b *testing.B) {
if err = tx.Commit(); err != nil { if err = tx.Commit(); err != nil {
b.Fatal(err) b.Fatal(err)
} }
tx.Close()
} }
} }
...@@ -808,5 +812,7 @@ func BenchmarkUpperRollbackManyTransactions(b *testing.B) { ...@@ -808,5 +812,7 @@ func BenchmarkUpperRollbackManyTransactions(b *testing.B) {
if err = tx.Rollback(); err != nil { if err = tx.Rollback(); err != nil {
b.Fatal(err) b.Fatal(err)
} }
tx.Close()
} }
} }
...@@ -336,6 +336,7 @@ func BenchmarkUpperAppendTransaction(b *testing.B) { ...@@ -336,6 +336,7 @@ func BenchmarkUpperAppendTransaction(b *testing.B) {
if tx, err = sess.Transaction(); err != nil { if tx, err = sess.Transaction(); err != nil {
b.Fatal(err) b.Fatal(err)
} }
defer tx.Close()
var artist db.Collection var artist db.Collection
if artist, err = tx.Collection("artist"); err != nil { if artist, err = tx.Collection("artist"); err != nil {
...@@ -378,6 +379,7 @@ func BenchmarkUpperAppendTransactionWithMap(b *testing.B) { ...@@ -378,6 +379,7 @@ func BenchmarkUpperAppendTransactionWithMap(b *testing.B) {
if tx, err = sess.Transaction(); err != nil { if tx, err = sess.Transaction(); err != nil {
b.Fatal(err) b.Fatal(err)
} }
defer tx.Close()
var artist db.Collection var artist db.Collection
if artist, err = tx.Collection("artist"); err != nil { if artist, err = tx.Collection("artist"); err != nil {
...@@ -778,6 +780,8 @@ func BenchmarkUpperCommitManyTransactions(b *testing.B) { ...@@ -778,6 +780,8 @@ func BenchmarkUpperCommitManyTransactions(b *testing.B) {
if err = tx.Commit(); err != nil { if err = tx.Commit(); err != nil {
b.Fatal(err) b.Fatal(err)
} }
tx.Close()
} }
} }
...@@ -820,5 +824,7 @@ func BenchmarkUpperRollbackManyTransactions(b *testing.B) { ...@@ -820,5 +824,7 @@ func BenchmarkUpperRollbackManyTransactions(b *testing.B) {
if err = tx.Rollback(); err != nil { if err = tx.Rollback(); err != nil {
b.Fatal(err) b.Fatal(err)
} }
tx.Close()
} }
} }
...@@ -402,6 +402,7 @@ func BenchmarkUpperAppendTransaction(b *testing.B) { ...@@ -402,6 +402,7 @@ func BenchmarkUpperAppendTransaction(b *testing.B) {
if tx, err = sess.Transaction(); err != nil { if tx, err = sess.Transaction(); err != nil {
b.Fatal(err) b.Fatal(err)
} }
defer tx.Close()
var artist db.Collection var artist db.Collection
if artist, err = tx.Collection("artist"); err != nil { if artist, err = tx.Collection("artist"); err != nil {
...@@ -444,6 +445,7 @@ func BenchmarkUpperAppendTransactionWithMap(b *testing.B) { ...@@ -444,6 +445,7 @@ func BenchmarkUpperAppendTransactionWithMap(b *testing.B) {
if tx, err = sess.Transaction(); err != nil { if tx, err = sess.Transaction(); err != nil {
b.Fatal(err) b.Fatal(err)
} }
defer tx.Close()
var artist db.Collection var artist db.Collection
if artist, err = tx.Collection("artist"); err != nil { if artist, err = tx.Collection("artist"); err != nil {
...@@ -873,6 +875,8 @@ func BenchmarkUpperCommitManyTransactions(b *testing.B) { ...@@ -873,6 +875,8 @@ func BenchmarkUpperCommitManyTransactions(b *testing.B) {
if err = tx.Commit(); err != nil { if err = tx.Commit(); err != nil {
b.Fatal(err) b.Fatal(err)
} }
tx.Close()
} }
} }
...@@ -915,5 +919,7 @@ func BenchmarkUpperRollbackManyTransactions(b *testing.B) { ...@@ -915,5 +919,7 @@ func BenchmarkUpperRollbackManyTransactions(b *testing.B) {
if err = tx.Rollback(); err != nil { if err = tx.Rollback(); err != nil {
b.Fatal(err) b.Fatal(err)
} }
tx.Close()
} }
} }
...@@ -324,6 +324,7 @@ func BenchmarkUpperAppendTransaction(b *testing.B) { ...@@ -324,6 +324,7 @@ func BenchmarkUpperAppendTransaction(b *testing.B) {
if tx, err = sess.Transaction(); err != nil { if tx, err = sess.Transaction(); err != nil {
b.Fatal(err) b.Fatal(err)
} }
defer tx.Close()
var artist db.Collection var artist db.Collection
if artist, err = tx.Collection("artist"); err != nil { if artist, err = tx.Collection("artist"); err != nil {
...@@ -366,6 +367,7 @@ func BenchmarkUpperAppendTransactionWithMap(b *testing.B) { ...@@ -366,6 +367,7 @@ func BenchmarkUpperAppendTransactionWithMap(b *testing.B) {
if tx, err = sess.Transaction(); err != nil { if tx, err = sess.Transaction(); err != nil {
b.Fatal(err) b.Fatal(err)
} }
defer tx.Close()
var artist db.Collection var artist db.Collection
if artist, err = tx.Collection("artist"); err != nil { if artist, err = tx.Collection("artist"); err != nil {
...@@ -766,6 +768,8 @@ func BenchmarkUpperCommitManyTransactions(b *testing.B) { ...@@ -766,6 +768,8 @@ func BenchmarkUpperCommitManyTransactions(b *testing.B) {
if err = tx.Commit(); err != nil { if err = tx.Commit(); err != nil {
b.Fatal(err) b.Fatal(err)
} }
tx.Close()
} }
} }
...@@ -808,5 +812,7 @@ func BenchmarkUpperRollbackManyTransactions(b *testing.B) { ...@@ -808,5 +812,7 @@ func BenchmarkUpperRollbackManyTransactions(b *testing.B) {
if err = tx.Rollback(); err != nil { if err = tx.Rollback(); err != nil {
b.Fatal(err) b.Fatal(err)
} }
tx.Close()
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment