Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(spanner): unskip pg integeration tests against emulator #10628

Merged
merged 2 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading