@@ -488,7 +488,6 @@ func TestConnSendBatchCloseRowsPartiallyRead(t *testing.T) {
488488 defer cancel ()
489489
490490 pgxtest .RunWithQueryExecModes (ctx , t , defaultConnTestRunner , nil , func (ctx context.Context , t testing.TB , conn * pgx.Conn ) {
491-
492491 batch := & pgx.Batch {}
493492 batch .Queue ("select n from generate_series(0,5) n" )
494493 batch .Queue ("select n from generate_series(0,5) n" )
@@ -539,7 +538,6 @@ func TestConnSendBatchCloseRowsPartiallyRead(t *testing.T) {
539538 if err != nil {
540539 t .Fatal (err )
541540 }
542-
543541 })
544542}
545543
@@ -550,7 +548,6 @@ func TestConnSendBatchQueryError(t *testing.T) {
550548 defer cancel ()
551549
552550 pgxtest .RunWithQueryExecModes (ctx , t , defaultConnTestRunner , nil , func (ctx context.Context , t testing.TB , conn * pgx.Conn ) {
553-
554551 batch := & pgx.Batch {}
555552 batch .Queue ("select n from generate_series(0,5) n where 100/(5-n) > 0" )
556553 batch .Queue ("select n from generate_series(0,5) n" )
@@ -580,7 +577,6 @@ func TestConnSendBatchQueryError(t *testing.T) {
580577 if pgErr , ok := err .(* pgconn.PgError ); ! (ok && pgErr .Code == "22012" ) {
581578 t .Errorf ("br.Close() => %v, want error code %v" , err , 22012 )
582579 }
583-
584580 })
585581}
586582
@@ -591,7 +587,6 @@ func TestConnSendBatchQuerySyntaxError(t *testing.T) {
591587 defer cancel ()
592588
593589 pgxtest .RunWithQueryExecModes (ctx , t , defaultConnTestRunner , nil , func (ctx context.Context , t testing.TB , conn * pgx.Conn ) {
594-
595590 batch := & pgx.Batch {}
596591 batch .Queue ("select 1 1" )
597592
@@ -607,7 +602,6 @@ func TestConnSendBatchQuerySyntaxError(t *testing.T) {
607602 if err == nil {
608603 t .Error ("Expected error" )
609604 }
610-
611605 })
612606}
613607
@@ -618,7 +612,6 @@ func TestConnSendBatchQueryRowInsert(t *testing.T) {
618612 defer cancel ()
619613
620614 pgxtest .RunWithQueryExecModes (ctx , t , defaultConnTestRunner , nil , func (ctx context.Context , t testing.TB , conn * pgx.Conn ) {
621-
622615 sql := `create temporary table ledger(
623616 id serial primary key,
624617 description varchar not null,
@@ -647,7 +640,6 @@ func TestConnSendBatchQueryRowInsert(t *testing.T) {
647640 }
648641
649642 br .Close ()
650-
651643 })
652644}
653645
@@ -658,7 +650,6 @@ func TestConnSendBatchQueryPartialReadInsert(t *testing.T) {
658650 defer cancel ()
659651
660652 pgxtest .RunWithQueryExecModes (ctx , t , defaultConnTestRunner , nil , func (ctx context.Context , t testing.TB , conn * pgx.Conn ) {
661-
662653 sql := `create temporary table ledger(
663654 id serial primary key,
664655 description varchar not null,
@@ -687,7 +678,6 @@ func TestConnSendBatchQueryPartialReadInsert(t *testing.T) {
687678 }
688679
689680 br .Close ()
690-
691681 })
692682}
693683
@@ -698,7 +688,6 @@ func TestTxSendBatch(t *testing.T) {
698688 defer cancel ()
699689
700690 pgxtest .RunWithQueryExecModes (ctx , t , defaultConnTestRunner , nil , func (ctx context.Context , t testing.TB , conn * pgx.Conn ) {
701-
702691 sql := `create temporary table ledger1(
703692 id serial primary key,
704693 description varchar not null
@@ -757,7 +746,6 @@ func TestTxSendBatch(t *testing.T) {
757746 if err != nil {
758747 t .Fatal (err )
759748 }
760-
761749 })
762750}
763751
@@ -768,7 +756,6 @@ func TestTxSendBatchRollback(t *testing.T) {
768756 defer cancel ()
769757
770758 pgxtest .RunWithQueryExecModes (ctx , t , defaultConnTestRunner , nil , func (ctx context.Context , t testing.TB , conn * pgx.Conn ) {
771-
772759 sql := `create temporary table ledger1(
773760 id serial primary key,
774761 description varchar not null
@@ -795,7 +782,6 @@ func TestTxSendBatchRollback(t *testing.T) {
795782 if count != 0 {
796783 t .Errorf ("count => %v, want %v" , count , 0 )
797784 }
798-
799785 })
800786}
801787
@@ -855,7 +841,6 @@ func TestConnBeginBatchDeferredError(t *testing.T) {
855841 defer cancel ()
856842
857843 pgxtest .RunWithQueryExecModes (ctx , t , defaultConnTestRunner , nil , func (ctx context.Context , t testing.TB , conn * pgx.Conn ) {
858-
859844 pgxtest .SkipCockroachDB (t , conn , "Server does not support deferred constraint (https://github.com/cockroachdb/cockroach/issues/31632)" )
860845
861846 mustExec (t , conn , `create temporary table t (
@@ -894,7 +879,6 @@ func TestConnBeginBatchDeferredError(t *testing.T) {
894879 if err , ok := err .(* pgconn.PgError ); ! ok || err .Code != "23505" {
895880 t .Fatalf ("expected error 23505, got %v" , err )
896881 }
897-
898882 })
899883}
900884
0 commit comments