Simplify CockroachDB detection
This commit is contained in:
+2
-6
@@ -106,9 +106,7 @@ func TestTxCommitWhenDeferredConstraintFailure(t *testing.T) {
|
||||
conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
|
||||
defer closeConn(t, conn)
|
||||
|
||||
if conn.PgConn().ParameterStatus("crdb_version") != "" {
|
||||
t.Skip("Server does not support deferred constraint (https://github.com/cockroachdb/cockroach/issues/31632)")
|
||||
}
|
||||
skipCockroachDB(t, conn, "Server does not support deferred constraint (https://github.com/cockroachdb/cockroach/issues/31632)")
|
||||
|
||||
createSql := `
|
||||
create temporary table foo(
|
||||
@@ -275,9 +273,7 @@ func TestBeginIsoLevels(t *testing.T) {
|
||||
conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
|
||||
defer closeConn(t, conn)
|
||||
|
||||
if conn.PgConn().ParameterStatus("crdb_version") != "" {
|
||||
t.Skip("Server always uses SERIALIZABLE isolation (https://www.cockroachlabs.com/docs/stable/demo-serializable.html)")
|
||||
}
|
||||
skipCockroachDB(t, conn, "Server always uses SERIALIZABLE isolation (https://www.cockroachlabs.com/docs/stable/demo-serializable.html)")
|
||||
|
||||
isoLevels := []pgx.TxIsoLevel{pgx.Serializable, pgx.RepeatableRead, pgx.ReadCommitted, pgx.ReadUncommitted}
|
||||
for _, iso := range isoLevels {
|
||||
|
||||
Reference in New Issue
Block a user