Skip to content

Commit

Permalink
chore(spanner): unskip pg integeration tests against emulator (#10628)
Browse files Browse the repository at this point in the history
Co-authored-by: rahul2393 <[email protected]>
  • Loading branch information
hengfengli and rahul2393 authored Sep 13, 2024
1 parent b45d2ee commit 27c7188
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 16 deletions.
2 changes: 1 addition & 1 deletion spanner/emulator_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ EMULATOR_PID=$!

# Stop the emulator & clean the environment variable
function cleanup() {
kill -2 $EMULATOR_PID
kill -9 $EMULATOR_PID
unset SPANNER_EMULATOR_HOST
unset GCLOUD_TESTS_GOLANG_PROJECT_ID
echo "Cleanup the emulator";
Expand Down
13 changes: 0 additions & 13 deletions spanner/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,6 @@ loop:
// Test SingleUse transaction.
func TestIntegration_SingleUse(t *testing.T) {
t.Parallel()
skipEmulatorTestForPG(t)

ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
Expand Down Expand Up @@ -6218,12 +6217,6 @@ func skipEmulatorTest(t *testing.T) {
}
}

func skipEmulatorTestForPG(t *testing.T) {
if isEmulatorEnvSet() && testDialect == adminpb.DatabaseDialect_POSTGRESQL {
t.Skip("Skipping PG testing against the emulator.")
}
}

func skipUnsupportedPGTest(t *testing.T) {
if testDialect == adminpb.DatabaseDialect_POSTGRESQL {
t.Skip("Skipping testing of unsupported tests in Postgres dialect.")
Expand All @@ -6236,12 +6229,6 @@ func onlyRunForPGTest(t *testing.T) {
}
}

func skipForPGTest(t *testing.T) {
if testDialect == adminpb.DatabaseDialect_POSTGRESQL {
t.Skip("Skipping tests non needed for Postgres dialect.")
}
}

func verifyDirectPathRemoteAddress(t *testing.T) {
t.Helper()
if !dpConfig.attemptDirectPath {
Expand Down
2 changes: 1 addition & 1 deletion spanner/oc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TestOCStats(t *testing.T) {
}

func TestOCStats_SessionPool(t *testing.T) {
skipForPGTest(t)
skipUnsupportedPGTest(t)
DisableGfeLatencyAndHeaderMissingCountViews()
// expectedValues is a map of expected values for different configurations of
// multiplexed session env="GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS".
Expand Down
2 changes: 1 addition & 1 deletion spanner/row_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2100,7 +2100,7 @@ func BenchmarkColumn(b *testing.B) {
}

func TestSelectAll(t *testing.T) {
skipForPGTest(t)
skipUnsupportedPGTest(t)
type args struct {
destination interface{}
options []DecodeOptions
Expand Down

0 comments on commit 27c7188

Please sign in to comment.