pubsub: fix integration test flakiness by not running in parallel
The main issue with running in parallel is that tests in different
test suites are sharing topic/subscription ids, which cause errors
from test cleanup interleaved mid-test.
Fixes #1633.
Change-Id: I23accf08c4e271c2e85d24e6fcd853357239a36b
Reviewed-on: https://code-review.googlesource.com/c/gocloud/+/48494
Reviewed-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jean de Klerk <deklerk@google.com>
diff --git a/pubsub/integration_test.go b/pubsub/integration_test.go
index 309733b..7e97203 100644
--- a/pubsub/integration_test.go
+++ b/pubsub/integration_test.go
@@ -93,8 +93,6 @@
}
func TestIntegration_All(t *testing.T) {
- t.Skip("https://github.com/googleapis/google-cloud-go/issues/1633")
- t.Parallel()
ctx := context.Background()
client := integrationTestClient(ctx, t)
defer client.Close()
@@ -411,7 +409,6 @@
func TestIntegration_CancelReceive(t *testing.T) {
t.Skip("https://github.com/googleapis/google-cloud-go/issues/1666")
- t.Parallel()
ctx, cancel := context.WithCancel(context.Background())
client := integrationTestClient(ctx, t)
defer client.Close()
@@ -468,7 +465,6 @@
func TestIntegration_CreateSubscription_NeverExpire(t *testing.T) {
t.Skip("https://github.com/googleapis/google-cloud-go/issues/1637")
- t.Parallel()
ctx := context.Background()
client := integrationTestClient(ctx, t)
defer client.Close()
@@ -531,8 +527,6 @@
func TestIntegration_UpdateSubscription(t *testing.T) {
t.Skip("https://github.com/googleapis/google-cloud-go/issues/1643")
-
- t.Parallel()
ctx := context.Background()
client := integrationTestClient(ctx, t)
@@ -660,7 +654,6 @@
}
func TestIntegration_UpdateSubscription_ExpirationPolicy(t *testing.T) {
- t.Parallel()
ctx := context.Background()
client := integrationTestClient(ctx, t)
defer client.Close()
@@ -740,7 +733,6 @@
// whitelisting, a (gsuite) organization project, and specific permissions.
func TestIntegration_UpdateTopicLabels(t *testing.T) {
t.Skip("https://github.com/googleapis/google-cloud-go/issues/1669")
- t.Parallel()
ctx := context.Background()
client := integrationTestClient(ctx, t)
defer client.Close()
@@ -791,7 +783,6 @@
}
func TestIntegration_PublicTopic(t *testing.T) {
- t.Parallel()
ctx := context.Background()
client := integrationTestClient(ctx, t)
defer client.Close()
@@ -817,7 +808,6 @@
func TestIntegration_Errors(t *testing.T) {
// Test various edge conditions.
- t.Parallel()
ctx := context.Background()
client := integrationTestClient(ctx, t)
defer client.Close()
@@ -879,7 +869,6 @@
func TestIntegration_MessageStoragePolicy_TopicLevel(t *testing.T) {
t.Skip("https://github.com/googleapis/google-cloud-go/issues/1599")
- t.Parallel()
ctx := context.Background()
client := integrationTestClient(ctx, t)
defer client.Close()
@@ -989,7 +978,6 @@
}
func TestIntegration_CreateTopic_KMS(t *testing.T) {
- t.Parallel()
ctx := context.Background()
client := integrationTestClient(ctx, t)
defer client.Close()
@@ -1063,7 +1051,6 @@
}
func TestIntegration_CreateTopic_MessageStoragePolicy(t *testing.T) {
- t.Parallel()
ctx := context.Background()
client := integrationTestClient(ctx, t)
defer client.Close()