Browse Source

Merge pull request #238 from go-sql-driver/vet

vet: rename fatal to fatalf in driver_test.go
Julien Schmidt 11 years ago
parent
commit
2d54aad406
1 changed files with 4 additions and 4 deletions
  1. 4 4
      driver_test.go

+ 4 - 4
driver_test.go

@@ -1254,7 +1254,7 @@ func TestConcurrent(t *testing.T) {
 
 
 		var fatalError string
 		var fatalError string
 		var once sync.Once
 		var once sync.Once
-		fatal := func(s string, vals ...interface{}) {
+		fatalf := func(s string, vals ...interface{}) {
 			once.Do(func() {
 			once.Do(func() {
 				fatalError = fmt.Sprintf(s, vals...)
 				fatalError = fmt.Sprintf(s, vals...)
 			})
 			})
@@ -1269,7 +1269,7 @@ func TestConcurrent(t *testing.T) {
 
 
 				if err != nil {
 				if err != nil {
 					if err.Error() != "Error 1040: Too many connections" {
 					if err.Error() != "Error 1040: Too many connections" {
-						fatal("Error on Conn %d: %s", id, err.Error())
+						fatalf("Error on Conn %d: %s", id, err.Error())
 					}
 					}
 					return
 					return
 				}
 				}
@@ -1277,13 +1277,13 @@ func TestConcurrent(t *testing.T) {
 				// keep the connection busy until all connections are open
 				// keep the connection busy until all connections are open
 				for remaining > 0 {
 				for remaining > 0 {
 					if _, err = tx.Exec("DO 1"); err != nil {
 					if _, err = tx.Exec("DO 1"); err != nil {
-						fatal("Error on Conn %d: %s", id, err.Error())
+						fatalf("Error on Conn %d: %s", id, err.Error())
 						return
 						return
 					}
 					}
 				}
 				}
 
 
 				if err = tx.Commit(); err != nil {
 				if err = tx.Commit(); err != nil {
-					fatal("Error on Conn %d: %s", id, err.Error())
+					fatalf("Error on Conn %d: %s", id, err.Error())
 					return
 					return
 				}
 				}