(t *testing.T)
| 875 | } |
| 876 | |
| 877 | func TestConnPrepareSyntaxError(t *testing.T) { |
| 878 | t.Parallel() |
| 879 | |
| 880 | ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second) |
| 881 | defer cancel() |
| 882 | |
| 883 | pgConn, err := pgconn.Connect(ctx, os.Getenv("PGX_TEST_DATABASE")) |
| 884 | require.NoError(t, err) |
| 885 | defer closeConn(t, pgConn) |
| 886 | |
| 887 | psd, err := pgConn.Prepare(ctx, "ps1", "SYNTAX ERROR", nil) |
| 888 | require.Nil(t, psd) |
| 889 | require.NotNil(t, err) |
| 890 | |
| 891 | ensureConnValid(t, pgConn) |
| 892 | } |
| 893 | |
| 894 | func TestConnPrepareContextPrecanceled(t *testing.T) { |
| 895 | t.Parallel() |
nothing calls this directly
no test coverage detected