Skip to content

Commit

Permalink
test(spanner): skip failing tests on cloud-devel and staging
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul2393 committed Dec 24, 2024
1 parent e9a8e3a commit 2bb63e0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spanner/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,8 @@ func TestIntegration_SingleUse_WithQueryOptions(t *testing.T) {

func TestIntegration_TransactionWasStartedInDifferentSession(t *testing.T) {
t.Parallel()
// Issue: https://b.corp.google.com/issues/309745482
skipOnNonProd(t)

ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
Expand Down Expand Up @@ -6220,6 +6222,13 @@ func skipUnsupportedPGTest(t *testing.T) {
}
}

func skipOnNonProd(t *testing.T) {
job := os.Getenv("JOB_TYPE")
if strings.Contains(job, "cloud-devel") || strings.Contains(job, "cloud-staging") {
t.Skip("Skipping test on non-production environment.")
}
}

func onlyRunForPGTest(t *testing.T) {
if testDialect != adminpb.DatabaseDialect_POSTGRESQL {
t.Skip("Skipping tests supported only in Postgres dialect.")
Expand Down

0 comments on commit 2bb63e0

Please sign in to comment.