diff --git a/tests/acquire_shard_test.go b/tests/acquire_shard_test.go index 610bdfba791..e244e864f27 100644 --- a/tests/acquire_shard_test.go +++ b/tests/acquire_shard_test.go @@ -32,12 +32,14 @@ import ( // TestAcquireShard_OwnershipLostErrorSuite tests what happens when acquire shard returns an ownership lost error. func TestAcquireShard_OwnershipLostErrorSuite(t *testing.T) { + t.Parallel() s := new(OwnershipLostErrorSuite) suite.Run(t, s) } // TestAcquireShard_DeadlineExceededErrorSuite tests what happens when acquire shard returns a deadline exceeded error func TestAcquireShard_DeadlineExceededErrorSuite(t *testing.T) { + t.Parallel() s := new(DeadlineExceededErrorSuite) suite.Run(t, s) } @@ -46,6 +48,7 @@ func TestAcquireShard_DeadlineExceededErrorSuite(t *testing.T) { // exceeded error followed by a successful acquire shard call. // To make this test deterministic, we set the seed to in the config file to a fixed value. func TestAcquireShard_EventualSuccess(t *testing.T) { + t.Parallel() s := new(EventualSuccessSuite) suite.Run(t, s) } diff --git a/tests/activity.go b/tests/activity.go index d45e487c96e..6be151dbc03 100644 --- a/tests/activity.go +++ b/tests/activity.go @@ -1394,7 +1394,7 @@ func (s *ActivityTestSuite) TestActivityHeartBeat_RecordIdentity() { func (s *ActivityTestSuite) TestActivityTaskCompleteForceCompletion() { sdkClient, err := sdkclient.Dial(sdkclient.Options{ - HostPort: s.GetTestCluster().Host().FrontendGRPCAddress(), + HostPort: s.FrontendGRPCAddress(), Namespace: s.Namespace(), }) s.NoError(err) @@ -1431,7 +1431,7 @@ func (s *ActivityTestSuite) TestActivityTaskCompleteForceCompletion() { func (s *ActivityTestSuite) TestActivityTaskCompleteRejectCompletion() { sdkClient, err := sdkclient.Dial(sdkclient.Options{ - HostPort: s.GetTestCluster().Host().FrontendGRPCAddress(), + HostPort: s.FrontendGRPCAddress(), Namespace: s.Namespace(), }) s.NoError(err) diff --git a/tests/activity_test.go b/tests/activity_test.go index 5fdc7f7655f..0816b40c2e7 100644 --- a/tests/activity_test.go +++ b/tests/activity_test.go @@ -30,10 +30,12 @@ import ( ) func TestActivityTestSuite(t *testing.T) { + t.Parallel() flag.Parse() suite.Run(t, &ActivityTestSuite{}) } func TestActivityClientTestSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(ActivityClientTestSuite)) } diff --git a/tests/add_tasks.go b/tests/add_tasks.go index de46f98d00e..a0e800387eb 100644 --- a/tests/add_tasks.go +++ b/tests/add_tasks.go @@ -271,7 +271,7 @@ func (s *AddTasksSuite) TestAddTasks_GetEngineErr() { func (s *AddTasksSuite) newSDKClient() sdkclient.Client { client, err := sdkclient.Dial(sdkclient.Options{ - HostPort: s.HostPort(), + HostPort: s.FrontendGRPCAddress(), Namespace: s.Namespace(), }) s.NoError(err) diff --git a/tests/add_tasks_test.go b/tests/add_tasks_test.go index 00bb167a95d..263561e785f 100644 --- a/tests/add_tasks_test.go +++ b/tests/add_tasks_test.go @@ -31,5 +31,6 @@ import ( ) func TestAddTasksSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(AddTasksSuite)) } diff --git a/tests/admin_test.go b/tests/admin_test.go index 9305e7694b7..34d07ae94a9 100644 --- a/tests/admin_test.go +++ b/tests/admin_test.go @@ -31,5 +31,6 @@ import ( ) func TestAdminTestSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(AdminTestSuite)) } diff --git a/tests/archival_test.go b/tests/archival_test.go index 98551dd4726..fbea134b243 100644 --- a/tests/archival_test.go +++ b/tests/archival_test.go @@ -34,6 +34,7 @@ import ( ) func TestArchivalSuite(t *testing.T) { + t.Parallel() flag.Parse() s := new(ArchivalSuite) dynamicConfigOverrides := map[dynamicconfig.Key]any{ diff --git a/tests/callbacks_test.go b/tests/callbacks_test.go index d0a6556d4ba..7d5c7165524 100644 --- a/tests/callbacks_test.go +++ b/tests/callbacks_test.go @@ -66,6 +66,7 @@ type CallbacksSuite struct { } func TestCallbacksSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(CallbacksSuite)) } @@ -245,7 +246,7 @@ func (s *CallbacksSuite) TestWorkflowNexusCallbacks_CarriedOver() { s.T().Run(tc.name, func(t *testing.T) { ctx := testcore.NewContext() sdkClient, err := client.Dial(client.Options{ - HostPort: s.GetTestCluster().Host().FrontendGRPCAddress(), + HostPort: s.FrontendGRPCAddress(), Namespace: s.Namespace(), }) s.NoError(err) diff --git a/tests/cancel_workflow_test.go b/tests/cancel_workflow_test.go index 4291654e24d..b36c1460c7b 100644 --- a/tests/cancel_workflow_test.go +++ b/tests/cancel_workflow_test.go @@ -31,5 +31,6 @@ import ( ) func TestCancelWorkflowSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(CancelWorkflowSuite)) } diff --git a/tests/child_workflow_test.go b/tests/child_workflow_test.go index e703dac2467..7940a11fc05 100644 --- a/tests/child_workflow_test.go +++ b/tests/child_workflow_test.go @@ -31,5 +31,6 @@ import ( ) func TestChildWorkflowSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(ChildWorkflowSuite)) } diff --git a/tests/client_data_converter.go b/tests/client_data_converter.go index edfabdc2aa7..20f8d44b809 100644 --- a/tests/client_data_converter.go +++ b/tests/client_data_converter.go @@ -101,7 +101,7 @@ func testChildWorkflow(ctx workflow.Context, totalCount, runCount int) (string, func (s *ClientDataConverterTestSuite) startWorkerWithDataConverter(tl string, dataConverter converter.DataConverter) (sdkclient.Client, worker.Worker) { sdkClient, err := sdkclient.Dial(sdkclient.Options{ - HostPort: s.HostPort(), + HostPort: s.FrontendGRPCAddress(), Namespace: s.Namespace(), DataConverter: dataConverter, }) diff --git a/tests/client_data_converter_test.go b/tests/client_data_converter_test.go index b3676297fe8..21961021283 100644 --- a/tests/client_data_converter_test.go +++ b/tests/client_data_converter_test.go @@ -31,5 +31,6 @@ import ( ) func TestClientDataConverterTestSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(ClientDataConverterTestSuite)) } diff --git a/tests/client_misc_test.go b/tests/client_misc_test.go index 7cc4fe55fd4..abd0acc9dcb 100644 --- a/tests/client_misc_test.go +++ b/tests/client_misc_test.go @@ -32,6 +32,7 @@ import ( ) func TestClientMiscTestSuite(t *testing.T) { + t.Parallel() flag.Parse() suite.Run(t, new(ClientMiscTestSuite)) } diff --git a/tests/continue_as_new_test.go b/tests/continue_as_new_test.go index de0d99d83bc..141625b695d 100644 --- a/tests/continue_as_new_test.go +++ b/tests/continue_as_new_test.go @@ -32,6 +32,7 @@ import ( ) func TestContinueAsNewTestSuite(t *testing.T) { + t.Parallel() flag.Parse() suite.Run(t, new(ContinueAsNewTestSuite)) } diff --git a/tests/cron_test.go b/tests/cron_test.go index dd1e8cc59fd..4500c209be0 100644 --- a/tests/cron_test.go +++ b/tests/cron_test.go @@ -32,6 +32,7 @@ import ( ) func TestCronTestSuite(t *testing.T) { + t.Parallel() flag.Parse() suite.Run(t, new(CronTestSuite)) } diff --git a/tests/describe_task_queue_test.go b/tests/describe_task_queue_test.go index 04a81cf2fad..d99c71c0ad5 100644 --- a/tests/describe_task_queue_test.go +++ b/tests/describe_task_queue_test.go @@ -30,6 +30,7 @@ import ( ) func TestDescribeTaskQueueSuite(t *testing.T) { + t.Parallel() flag.Parse() suite.Run(t, new(DescribeTaskQueueSuite)) } diff --git a/tests/describe_test.go b/tests/describe_test.go index 3be1f90c82f..6e35fa53380 100644 --- a/tests/describe_test.go +++ b/tests/describe_test.go @@ -32,6 +32,7 @@ import ( ) func TestDescribeTestSuite(t *testing.T) { + t.Parallel() flag.Parse() suite.Run(t, new(DescribeTestSuite)) } diff --git a/tests/dlq.go b/tests/dlq.go index 313fe8e65f8..9346208a3cb 100644 --- a/tests/dlq.go +++ b/tests/dlq.go @@ -156,12 +156,12 @@ func (s *DLQSuite) SetupSuite() { ) s.tdbgApp = tdbgtest.NewCliApp( func(params *tdbg.Params) { - params.ClientFactory = tdbg.NewClientFactory(tdbg.WithFrontendAddress(s.HostPort())) + params.ClientFactory = tdbg.NewClientFactory(tdbg.WithFrontendAddress(s.FrontendGRPCAddress())) params.Writer = &s.writer }, ) sdkClient, err := sdkclient.Dial(sdkclient.Options{ - HostPort: s.HostPort(), + HostPort: s.FrontendGRPCAddress(), Namespace: s.Namespace(), }) s.NoError(err) @@ -506,7 +506,7 @@ func (s *DLQSuite) verifyRunIsInDLQ( // executeWorkflow just executes a simple no-op workflow that returns "hello" and returns the sdk workflow run. func (s *DLQSuite) executeWorkflow(ctx context.Context, workflowID string) sdkclient.WorkflowRun { sdkClient, err := sdkclient.Dial(sdkclient.Options{ - HostPort: s.HostPort(), + HostPort: s.FrontendGRPCAddress(), Namespace: s.Namespace(), }) s.NoError(err) diff --git a/tests/dlq_test.go b/tests/dlq_test.go index fd0546120fa..292d86ec3f3 100644 --- a/tests/dlq_test.go +++ b/tests/dlq_test.go @@ -32,6 +32,7 @@ import ( ) func TestDLQSuite(t *testing.T) { + t.Parallel() flag.Parse() suite.Run(t, new(DLQSuite)) } diff --git a/tests/eager_workflow_start.go b/tests/eager_workflow_start.go index f80c088b7f6..3b25c6355e1 100644 --- a/tests/eager_workflow_start.go +++ b/tests/eager_workflow_start.go @@ -114,11 +114,7 @@ func (s *EagerWorkflowTestSuite) pollWorkflowTaskQueue() *workflowservice.PollWo } func (s *EagerWorkflowTestSuite) getWorkflowStringResult(workflowID, runID string) string { - hostPort := "127.0.0.1:7134" - if testcore.TestFlags.FrontendAddr != "" { - hostPort = testcore.TestFlags.FrontendAddr - } - c, err := client.Dial(client.Options{HostPort: hostPort, Namespace: s.Namespace()}) + c, err := client.Dial(client.Options{HostPort: s.FrontendGRPCAddress(), Namespace: s.Namespace()}) s.Require().NoError(err) run := c.GetWorkflow(testcore.NewContext(), workflowID, runID) var result string diff --git a/tests/eager_workflow_start_test.go b/tests/eager_workflow_start_test.go index 2f56b2968c6..2c695847c6f 100644 --- a/tests/eager_workflow_start_test.go +++ b/tests/eager_workflow_start_test.go @@ -31,5 +31,6 @@ import ( ) func TestEagerWorkflowTestSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(EagerWorkflowTestSuite)) } diff --git a/tests/gethistory_test.go b/tests/gethistory_test.go index 6a01c64318d..6e371cf96ff 100644 --- a/tests/gethistory_test.go +++ b/tests/gethistory_test.go @@ -32,16 +32,19 @@ import ( ) func TestRawHistorySuite(t *testing.T) { + t.Parallel() flag.Parse() suite.Run(t, new(RawHistorySuite)) } func TestRawHistoryClientSuite(t *testing.T) { + t.Parallel() flag.Parse() suite.Run(t, new(RawHistoryClientSuite)) } func TestGetHistoryFunctionalSuite(t *testing.T) { + t.Parallel() flag.Parse() suite.Run(t, new(GetHistoryFunctionalSuite)) } diff --git a/tests/http_api_test.go b/tests/http_api_test.go index 65b7cb4dada..7d711cc9847 100644 --- a/tests/http_api_test.go +++ b/tests/http_api_test.go @@ -71,6 +71,7 @@ type HttpApiTestSuite struct { } func TestHttpApiTestSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(HttpApiTestSuite)) } diff --git a/tests/max_buffered_event_test.go b/tests/max_buffered_event_test.go index 22c687178b4..0fd4bf9a861 100644 --- a/tests/max_buffered_event_test.go +++ b/tests/max_buffered_event_test.go @@ -31,5 +31,6 @@ import ( ) func TestMaxBufferedEventSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(MaxBufferedEventSuite)) } diff --git a/tests/namespace/namespace_interceptor_test.go b/tests/namespace/namespace_interceptor_test.go index 8aeab041e6d..54f1d5eb034 100644 --- a/tests/namespace/namespace_interceptor_test.go +++ b/tests/namespace/namespace_interceptor_test.go @@ -31,5 +31,6 @@ import ( ) func TestNamespaceInterceptorTestSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(NamespaceInterceptorTestSuite)) } diff --git a/tests/ndc/ndc_test.go b/tests/ndc/ndc_test.go index f487014cc6a..7e6a3062fe6 100644 --- a/tests/ndc/ndc_test.go +++ b/tests/ndc/ndc_test.go @@ -101,6 +101,7 @@ type ( ) func TestNDCFuncTestSuite(t *testing.T) { + // TODO: doesn't work yet: t.Parallel() flag.Parse() suite.Run(t, new(NDCFunctionalTestSuite)) } diff --git a/tests/ndc/replication_migration_back_test.go b/tests/ndc/replication_migration_back_test.go index 1c6cce3d63f..f04d0160b75 100644 --- a/tests/ndc/replication_migration_back_test.go +++ b/tests/ndc/replication_migration_back_test.go @@ -89,6 +89,7 @@ type ( ) func TestReplicationMigrationBackTest(t *testing.T) { + // TODO: doesn't work yet: t.Parallel() flag.Parse() suite.Run(t, new(ReplicationMigrationBackTestSuite)) diff --git a/tests/ndc/replication_task_batching_test.go b/tests/ndc/replication_task_batching_test.go index 9e5c96aea5f..fde95c2ff3a 100644 --- a/tests/ndc/replication_task_batching_test.go +++ b/tests/ndc/replication_task_batching_test.go @@ -87,6 +87,7 @@ type ( ) func TestNDCReplicationTaskBatching(t *testing.T) { + // TODO: doesn't work yet: t.Parallel() flag.Parse() suite.Run(t, new(NDCReplicationTaskBatchingTestSuite)) } diff --git a/tests/nexus/nexus_api_test.go b/tests/nexus/nexus_api_test.go index ba115d994d7..b30e966e1e0 100644 --- a/tests/nexus/nexus_api_test.go +++ b/tests/nexus/nexus_api_test.go @@ -60,6 +60,7 @@ type NexusApiTestSuite struct { } func TestNexusApiTestSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(NexusApiTestSuite)) } diff --git a/tests/nexus/nexus_endpoint_test.go b/tests/nexus/nexus_endpoint_test.go index 49d7ba9ff64..2953f2aea88 100644 --- a/tests/nexus/nexus_endpoint_test.go +++ b/tests/nexus/nexus_endpoint_test.go @@ -45,6 +45,7 @@ import ( ) func TestNexusEndpointsFunctionalSuite(t *testing.T) { + t.Parallel() t.Run("Common", func(t *testing.T) { s := new(CommonSuite) suite.Run(t, s) diff --git a/tests/nexus/nexus_workflow_test.go b/tests/nexus/nexus_workflow_test.go index 9e1adf516c8..ef639a0224e 100644 --- a/tests/nexus/nexus_workflow_test.go +++ b/tests/nexus/nexus_workflow_test.go @@ -65,6 +65,7 @@ type NexusWorkflowTestSuite struct { } func TestNexusWorkflowTestSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(NexusWorkflowTestSuite)) } diff --git a/tests/purge_dlq_tasks_api_test.go b/tests/purge_dlq_tasks_api_test.go index baef8576c91..e8c269c917e 100644 --- a/tests/purge_dlq_tasks_api_test.go +++ b/tests/purge_dlq_tasks_api_test.go @@ -31,5 +31,6 @@ import ( ) func TestPurgeDLQTasksSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(PurgeDLQTasksSuite)) } diff --git a/tests/query_workflow_test.go b/tests/query_workflow_test.go index 993874f9f4c..223aedb5935 100644 --- a/tests/query_workflow_test.go +++ b/tests/query_workflow_test.go @@ -31,5 +31,6 @@ import ( ) func TestQueryWorkflowSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(QueryWorkflowSuite)) } diff --git a/tests/relay_task_test.go b/tests/relay_task_test.go index 35806dc1a87..de258767db0 100644 --- a/tests/relay_task_test.go +++ b/tests/relay_task_test.go @@ -31,5 +31,6 @@ import ( ) func TestRelayTaskTestSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(RelayTaskTestSuite)) } diff --git a/tests/schedule.go b/tests/schedule.go index 2ae887483db..bcc808c3faa 100644 --- a/tests/schedule.go +++ b/tests/schedule.go @@ -104,7 +104,7 @@ func (s *ScheduleFunctionalSuite) SetupTest() { s.HistoryRequire = historyrequire.New(s.T()) s.dataConverter = testcore.NewTestDataConverter() sdkClient, err := sdkclient.Dial(sdkclient.Options{ - HostPort: s.HostPort(), + HostPort: s.FrontendGRPCAddress(), Namespace: s.Namespace(), DataConverter: s.dataConverter, }) diff --git a/tests/schedule_test.go b/tests/schedule_test.go index 2114888fc2f..bc8b9627f53 100644 --- a/tests/schedule_test.go +++ b/tests/schedule_test.go @@ -32,6 +32,7 @@ import ( ) func TestScheduleFunctionalSuite(t *testing.T) { + t.Parallel() flag.Parse() suite.Run(t, new(ScheduleFunctionalSuite)) } diff --git a/tests/signal_workflow_test.go b/tests/signal_workflow_test.go index 1955fce7956..c188e6afb64 100644 --- a/tests/signal_workflow_test.go +++ b/tests/signal_workflow_test.go @@ -31,5 +31,6 @@ import ( ) func TestSignalWorkflowTestSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(SignalWorkflowTestSuite)) } diff --git a/tests/sizelimit_test.go b/tests/sizelimit_test.go index 138cfee2579..2757ac4251e 100644 --- a/tests/sizelimit_test.go +++ b/tests/sizelimit_test.go @@ -32,6 +32,7 @@ import ( ) func TestSizeLimitFunctionalSuite(t *testing.T) { + t.Parallel() flag.Parse() suite.Run(t, new(SizeLimitFunctionalSuite)) } diff --git a/tests/stickytq_test.go b/tests/stickytq_test.go index ad04bd31182..34dc494914e 100644 --- a/tests/stickytq_test.go +++ b/tests/stickytq_test.go @@ -31,5 +31,6 @@ import ( ) func TestStickyTqTestSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(StickyTqTestSuite)) } diff --git a/tests/testcore/client_suite.go b/tests/testcore/client_suite.go index d918b913454..4d468875def 100644 --- a/tests/testcore/client_suite.go +++ b/tests/testcore/client_suite.go @@ -111,7 +111,7 @@ func (s *ClientFunctionalSuite) SetupTest() { "http://"+s.HttpAPIAddress()+"/namespaces/{{.NamespaceName}}/nexus/callback") sdkClient, err := sdkclient.Dial(sdkclient.Options{ - HostPort: s.HostPort(), + HostPort: s.FrontendGRPCAddress(), Namespace: s.Namespace(), }) if err != nil { diff --git a/tests/testcore/flag.go b/tests/testcore/flag.go index e3b0f21e4d8..5a6936b53a7 100644 --- a/tests/testcore/flag.go +++ b/tests/testcore/flag.go @@ -34,7 +34,6 @@ import ( // TestFlags contains the feature flags for functional tests var TestFlags struct { - FrontendAddr string FrontendHTTPAddr string PersistenceType string PersistenceDriver string @@ -43,7 +42,6 @@ var TestFlags struct { } func init() { - flag.StringVar(&TestFlags.FrontendAddr, "frontendAddress", "", "host:port for temporal frontend service") flag.StringVar(&TestFlags.FrontendHTTPAddr, "frontendHttpAddress", "", "host:port for temporal frontend HTTP service (only applies when frontendAddress set)") flag.StringVar(&TestFlags.PersistenceType, "persistenceType", "sql", "type of persistence - [nosql or sql]") flag.StringVar(&TestFlags.PersistenceDriver, "persistenceDriver", "sqlite", "driver of nosql/sql - [cassandra, mysql8, postgres12, sqlite]") diff --git a/tests/testcore/functional_test.go b/tests/testcore/functional_test.go index e5383c64a57..2e8aa50395e 100644 --- a/tests/testcore/functional_test.go +++ b/tests/testcore/functional_test.go @@ -32,6 +32,7 @@ import ( ) func TestFunctionalSuite(t *testing.T) { + t.Parallel() flag.Parse() suite.Run(t, new(FunctionalSuite)) } diff --git a/tests/testcore/functional_test_base.go b/tests/testcore/functional_test_base.go index 2ecf460f2a5..cc78ff88861 100644 --- a/tests/testcore/functional_test_base.go +++ b/tests/testcore/functional_test_base.go @@ -77,7 +77,6 @@ type ( foreignNamespace string archivalNamespace string dynamicConfigOverrides map[dynamicconfig.Key]interface{} - hostPort string } // TestClusterParams contains the variables which are used to configure test suites via the Option type. TestClusterParams struct { @@ -139,8 +138,8 @@ func (s *FunctionalTestBase) ForeignNamespace() string { return s.foreignNamespace } -func (s *FunctionalTestBase) HostPort() string { - return s.hostPort +func (s *FunctionalTestBase) FrontendGRPCAddress() string { + return s.GetTestCluster().Host().FrontendGRPCAddress() } func (s *FunctionalTestBase) SetDynamicConfigOverrides(dynamicConfig map[dynamicconfig.Key]interface{}) { @@ -152,14 +151,13 @@ func (s *FunctionalTestBase) SetupSuite(defaultClusterConfigFile string, options params := ApplyTestClusterParams(options) - s.hostPort = "127.0.0.1:7134" - if TestFlags.FrontendAddr != "" { - s.hostPort = TestFlags.FrontendAddr - } s.setupLogger() clusterConfig, err := GetTestClusterConfig(defaultClusterConfigFile) s.Require().NoError(err) + s.Empty(clusterConfig.DeprecatedFrontendAddress, "Functional tests against external frontends are not supported") + s.Empty(clusterConfig.DeprecatedClusterNo, "ClusterNo should not be present in cluster config files") + if clusterConfig.DynamicConfigOverrides == nil { clusterConfig.DynamicConfigOverrides = make(map[dynamicconfig.Key]interface{}) } @@ -177,28 +175,13 @@ func (s *FunctionalTestBase) SetupSuite(defaultClusterConfigFile string, options clusterConfig.EnableMetricsCapture = true s.testClusterConfig = clusterConfig - if clusterConfig.FrontendAddress != "" { - s.Logger.Info("Running functional test against specified frontend", tag.Address(TestFlags.FrontendAddr)) - - connection, err := rpc.Dial(TestFlags.FrontendAddr, nil, s.Logger) - if err != nil { - s.Require().NoError(err) - } - - s.client = workflowservice.NewWorkflowServiceClient(connection) - s.adminClient = adminservice.NewAdminServiceClient(connection) - s.operatorClient = operatorservice.NewOperatorServiceClient(connection) - s.httpAPIAddress = TestFlags.FrontendHTTPAddr - } else { - s.Logger.Info("Running functional test against test cluster") - cluster, err := s.testClusterFactory.NewCluster(s.T(), clusterConfig, s.Logger) - s.Require().NoError(err) - s.testCluster = cluster - s.client = s.testCluster.FrontendClient() - s.adminClient = s.testCluster.AdminClient() - s.operatorClient = s.testCluster.OperatorClient() - s.httpAPIAddress = cluster.Host().FrontendHTTPAddress() - } + cluster, err := s.testClusterFactory.NewCluster(s.T(), clusterConfig, s.Logger) + s.Require().NoError(err) + s.testCluster = cluster + s.client = s.testCluster.FrontendClient() + s.adminClient = s.testCluster.AdminClient() + s.operatorClient = s.testCluster.OperatorClient() + s.httpAPIAddress = cluster.Host().FrontendHTTPAddress() s.namespace = RandomizeStr("functional-test-namespace") s.Require().NoError(s.registerNamespaceWithDefaults(s.namespace)) @@ -315,7 +298,6 @@ func GetTestClusterConfig(configFile string) (*TestClusterConfig, error) { options.FaultInjection = fiOptions.FaultInjection } - options.FrontendAddress = TestFlags.FrontendAddr return &options, nil } diff --git a/tests/testcore/functional_test_base_test.go b/tests/testcore/functional_test_base_test.go index 5e1a173c82c..469a27e89f2 100644 --- a/tests/testcore/functional_test_base_test.go +++ b/tests/testcore/functional_test_base_test.go @@ -31,5 +31,6 @@ import ( ) func TestFunctionalTestBaseSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(FunctionalTestBaseSuite)) } diff --git a/tests/testcore/onebox.go b/tests/testcore/onebox.go index 639273f6ace..0d47ec8c26b 100644 --- a/tests/testcore/onebox.go +++ b/tests/testcore/onebox.go @@ -358,6 +358,11 @@ func (c *TemporalImpl) FrontendGRPCAddress() string { return c.frontendMembershipAddress } +// Use this to get an address for a remote cluster to connect to. +func (c *TemporalImpl) RemoteFrontendGRPCAddress() string { + return c.FrontendGRPCAddresses()[0] +} + func (c *TemporalImpl) FrontendHTTPAddress() string { // randomize like a load balancer would addrs := c.FrontendGRPCAddresses() diff --git a/tests/testcore/test_cluster.go b/tests/testcore/test_cluster.go index c6a58c5542f..ee9459a0139 100644 --- a/tests/testcore/test_cluster.go +++ b/tests/testcore/test_cluster.go @@ -73,6 +73,7 @@ type ( TestCluster struct { testBase *persistencetests.TestBase archiverBase *ArchiverBase + clusterNo int host *TemporalImpl } @@ -88,10 +89,8 @@ type ( // TestClusterConfig are config for a test cluster TestClusterConfig struct { - FrontendAddress string EnableArchival bool IsMasterCluster bool - ClusterNo int ClusterMetadata cluster.Config Persistence persistencetests.TestBaseOptions FrontendConfig FrontendConfig @@ -106,6 +105,9 @@ type ( EnableMetricsCapture bool // ServiceFxOptions can be populated using WithFxOptionsForService. ServiceFxOptions map[primitives.ServiceName][]fx.Option + + DeprecatedFrontendAddress string `yaml:"FrontendAddress"` + DeprecatedClusterNo int `yaml:"ClusterNo"` } ) @@ -188,6 +190,18 @@ func (f *defaultPersistenceTestBaseFactory) NewTestBase(options *persistencetest } func NewClusterWithPersistenceTestBaseFactory(t *testing.T, options *TestClusterConfig, logger log.Logger, tbFactory PersistenceTestBaseFactory) (*TestCluster, error) { + clusterNo := GetFreeClusterNumber() + + if len(options.ClusterMetadata.ClusterInformation) > 0 { + // set self-address for current cluster + // TODO: remove duplication between this and makeGRPCAddresses. we don't have a TemporalImpl + // yet so we can't just call that. + ci := options.ClusterMetadata.ClusterInformation[options.ClusterMetadata.CurrentClusterName] + ci.RPCAddress = fmt.Sprintf("127.0.%d.%d:%d", clusterNo, 1, frontendPort) + ci.HTTPAddress = fmt.Sprintf("127.0.%d.%d:%d", clusterNo, 1, frontendHTTPPort) + options.ClusterMetadata.ClusterInformation[options.ClusterMetadata.CurrentClusterName] = ci + } + clusterMetadataConfig := cluster.NewTestClusterMetadataConfig( options.ClusterMetadata.EnableGlobalNamespace, options.IsMasterCluster, @@ -299,7 +313,7 @@ func NewClusterWithPersistenceTestBaseFactory(t *testing.T, options *TestCluster VisibilityStoreFactory: testBase.VisibilityStoreFactory, TaskMgr: testBase.TaskMgr, Logger: logger, - ClusterNo: options.ClusterNo, + ClusterNo: clusterNo, ESConfig: options.ESConfig, ESClient: esClient, ArchiverMetadata: archiverBase.metadata, @@ -330,7 +344,7 @@ func NewClusterWithPersistenceTestBaseFactory(t *testing.T, options *TestCluster return nil, err } - return &TestCluster{testBase: testBase, archiverBase: archiverBase, host: cluster}, nil + return &TestCluster{testBase: testBase, archiverBase: archiverBase, clusterNo: clusterNo, host: cluster}, nil } func setupIndex(esConfig *esclient.Config, logger log.Logger) error { @@ -499,6 +513,8 @@ func newArchiverBase(enabled bool, logger log.Logger) *ArchiverBase { // TearDownCluster tears down the test cluster func (tc *TestCluster) TearDownCluster() error { + defer PutFreeClusterNumber(tc.clusterNo) + errs := tc.host.Stop() tc.testBase.TearDownWorkflowStore() if !UsingSQLAdvancedVisibility() && tc.host.esConfig != nil { diff --git a/tests/testcore/utils.go b/tests/testcore/utils.go index af10abd416b..38a6a24ac24 100644 --- a/tests/testcore/utils.go +++ b/tests/testcore/utils.go @@ -37,6 +37,19 @@ import ( "go.temporal.io/server/common/persistence/versionhistory" ) +const maxClusterNumber = 200 + +var freeClusterNumbers = make(chan int, maxClusterNumber) + +func init() { + for i := 0; i < maxClusterNumber; i++ { + freeClusterNumbers <- i + } +} + +func GetFreeClusterNumber() int { return <-freeClusterNumbers } +func PutFreeClusterNumber(i int) { freeClusterNumbers <- i } + func RandomizeStr(id string) string { return fmt.Sprintf("%v-%v", id, uuid.New()) } diff --git a/tests/testdata/ndc_clusters.yaml b/tests/testdata/ndc_clusters.yaml index 5cafa8c0abd..a0287df9e6a 100644 --- a/tests/testdata/ndc_clusters.yaml +++ b/tests/testdata/ndc_clusters.yaml @@ -10,17 +10,17 @@ enabled: true initialFailoverVersion: 1 rpcName: "frontend" - rpcAddress: "127.0.0.1:7134" + rpcAddress: "nowhere1:7134" cluster-b: enabled: true initialFailoverVersion: 2 rpcName: "frontend" - rpcAddress: "127.0.1.1:7134" + rpcAddress: "nowhere2:7134" cluster-c: enabled: true initialFailoverVersion: 3 rpcName: "frontend" - rpcAddress: "127.0.2.1:7134" + rpcAddress: "nowhere3:7134" enablearchival: false workerconfig: enablearchiver: false @@ -49,17 +49,17 @@ enabled: true initialFailoverVersion: 1 rpcName: "frontend" - rpcAddress: "127.0.0.1:7134" + rpcAddress: "nowhere1:7134" cluster-b: enabled: true initialFailoverVersion: 2 rpcName: "frontend" - rpcAddress: "127.0.1.1:7134" + rpcAddress: "nowhere2:7134" cluster-c: enabled: true initialFailoverVersion: 3 rpcName: "frontend" - rpcAddress: "127.0.2.1:7134" + rpcAddress: "nowhere3:7134" enablearchival: false workerconfig: enablearchiver: false @@ -88,17 +88,17 @@ enabled: true initialFailoverVersion: 1 rpcName: "frontend" - rpcAddress: "127.0.0.1:7134" + rpcAddress: "nowhere1:7134" cluster-b: enabled: true initialFailoverVersion: 2 rpcName: "frontend" - rpcAddress: "127.0.1.1:7134" + rpcAddress: "nowhere2:7134" cluster-c: enabled: true initialFailoverVersion: 3 rpcName: "frontend" - rpcAddress: "127.0.2.1:7134" + rpcAddress: "nowhere3:7134" enablearchival: false workerconfig: enablearchiver: false diff --git a/tests/testdata/xdc_adv_vis_clusters.yaml b/tests/testdata/xdc_adv_vis_clusters.yaml index 6ad636c984b..2bc62732425 100644 --- a/tests/testdata/xdc_adv_vis_clusters.yaml +++ b/tests/testdata/xdc_adv_vis_clusters.yaml @@ -10,7 +10,6 @@ enabled: true initialFailoverVersion: 1 rpcName: "frontend" - rpcAddress: "127.0.2.1:7134" enablearchival: false workerconfig: enablearchiver: false @@ -32,7 +31,6 @@ enabled: true initialFailoverVersion: 2 rpcName: "frontend" - rpcAddress: "127.0.3.1:7134" enablearchival: false workerconfig: enablearchiver: false diff --git a/tests/testdata/xdc_adv_vis_es_clusters.yaml b/tests/testdata/xdc_adv_vis_es_clusters.yaml index 078b87347ec..d7fe171738c 100644 --- a/tests/testdata/xdc_adv_vis_es_clusters.yaml +++ b/tests/testdata/xdc_adv_vis_es_clusters.yaml @@ -10,7 +10,6 @@ enabled: true initialFailoverVersion: 1 rpcName: "frontend" - rpcAddress: "127.0.2.1:7134" enablearchival: false workerconfig: enablearchiver: false @@ -39,7 +38,6 @@ enabled: true initialFailoverVersion: 2 rpcName: "frontend" - rpcAddress: "127.0.3.1:7134" enablearchival: false workerconfig: enablearchiver: false diff --git a/tests/testutils/source_root_test.go b/tests/testutils/source_root_test.go index e62806f5653..f3d59f9f1f8 100644 --- a/tests/testutils/source_root_test.go +++ b/tests/testutils/source_root_test.go @@ -32,6 +32,7 @@ import ( ) func TestGetRepoRootDirectory(t *testing.T) { + t.Parallel() t.Run("env var set", func(t *testing.T) { directory := GetRepoRootDirectory(WithGetenv(func(s string) string { assert.Equal(t, "TEMPORAL_ROOT", s) diff --git a/tests/tls.go b/tests/tls.go index 5f9b67c72b9..9ef94abebc3 100644 --- a/tests/tls.go +++ b/tests/tls.go @@ -57,7 +57,7 @@ func (s *TLSFunctionalSuite) SetupTest() { var err error s.sdkClient, err = sdkclient.Dial(sdkclient.Options{ - HostPort: s.HostPort(), + HostPort: s.FrontendGRPCAddress(), Namespace: s.Namespace(), ConnectionOptions: sdkclient.ConnectionOptions{ TLS: s.GetTestCluster().Host().TlsConfigProvider().FrontendClientConfig, diff --git a/tests/tls_test.go b/tests/tls_test.go index c899f54c188..f6008ae358c 100644 --- a/tests/tls_test.go +++ b/tests/tls_test.go @@ -32,6 +32,7 @@ import ( ) func TestTLSFunctionalSuite(t *testing.T) { + t.Parallel() flag.Parse() suite.Run(t, new(TLSFunctionalSuite)) } diff --git a/tests/transient_task_test.go b/tests/transient_task_test.go index 12c9ffe64c6..e561beb7811 100644 --- a/tests/transient_task_test.go +++ b/tests/transient_task_test.go @@ -31,5 +31,6 @@ import ( ) func TestTransientTaskSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(TransientTaskSuite)) } diff --git a/tests/update/reset_workflow.go b/tests/update/reset_workflow.go index 67fc2399a4e..1cc84b60f43 100644 --- a/tests/update/reset_workflow.go +++ b/tests/update/reset_workflow.go @@ -917,7 +917,7 @@ func (s *ResetWorkflowTestSuite) TestResetWorkflow_ResetAfterContinueAsNew() { // get sdkClient sdkClient, err := sdkclient.Dial(sdkclient.Options{ - HostPort: s.HostPort(), + HostPort: s.FrontendGRPCAddress(), Namespace: s.Namespace(), }) if err != nil { diff --git a/tests/update/reset_workflow_test.go b/tests/update/reset_workflow_test.go index 2d89b9012e0..86d17b4b454 100644 --- a/tests/update/reset_workflow_test.go +++ b/tests/update/reset_workflow_test.go @@ -31,5 +31,6 @@ import ( ) func TestResetWorkflowTestSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(ResetWorkflowTestSuite)) } diff --git a/tests/update/update_workflow_sdk_test.go b/tests/update/update_workflow_sdk_test.go index 9659b236166..c846bc1d10c 100644 --- a/tests/update/update_workflow_sdk_test.go +++ b/tests/update/update_workflow_sdk_test.go @@ -32,6 +32,7 @@ import ( // TestAcquireShard_OwnershipLostErrorSuite tests what happens when acquire shard returns an ownership lost error. func TestUpdateWorkflowClientSuite(t *testing.T) { + t.Parallel() s := new(UpdateWorkflowClientSuite) suite.Run(t, s) } diff --git a/tests/update/update_workflow_test.go b/tests/update/update_workflow_test.go index 76776bd5d60..02a4ec249e5 100644 --- a/tests/update/update_workflow_test.go +++ b/tests/update/update_workflow_test.go @@ -32,6 +32,7 @@ import ( // TestAcquireShard_OwnershipLostErrorSuite tests what happens when acquire shard returns an ownership lost error. func TestUpdateWorkflowSuite(t *testing.T) { + t.Parallel() s := new(UpdateWorkflowSuite) suite.Run(t, s) } diff --git a/tests/user_metadata_test.go b/tests/user_metadata_test.go index a4e0a349778..266fbdbc098 100644 --- a/tests/user_metadata_test.go +++ b/tests/user_metadata_test.go @@ -42,6 +42,7 @@ type UserMetadataSuite struct { } func TestUserMetadataSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(UserMetadataSuite)) } diff --git a/tests/user_timers_test.go b/tests/user_timers_test.go index cef5bc274b2..fa0db39a64e 100644 --- a/tests/user_timers_test.go +++ b/tests/user_timers_test.go @@ -31,5 +31,6 @@ import ( ) func TestUserTimersTestSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(UserTimersTestSuite)) } diff --git a/tests/versioning.go b/tests/versioning.go index 8247d85ddbd..efa0c561730 100644 --- a/tests/versioning.go +++ b/tests/versioning.go @@ -125,7 +125,7 @@ func (s *VersioningIntegSuite) SetupTest() { s.FunctionalTestBase.SetupTest() sdkClient, err := sdkclient.Dial(sdkclient.Options{ - HostPort: s.HostPort(), + HostPort: s.FrontendGRPCAddress(), Namespace: s.Namespace(), }) if err != nil { diff --git a/tests/versioning_test.go b/tests/versioning_test.go index 1e083a6b151..47066261462 100644 --- a/tests/versioning_test.go +++ b/tests/versioning_test.go @@ -32,6 +32,7 @@ import ( ) func TestVersioningFunctionalSuite(t *testing.T) { + t.Parallel() flag.Parse() suite.Run(t, new(VersioningIntegSuite)) } diff --git a/tests/visibility/advanced_visibility.go b/tests/visibility/advanced_visibility.go index a7b3f59ba7c..d81c8dcc0a8 100644 --- a/tests/visibility/advanced_visibility.go +++ b/tests/visibility/advanced_visibility.go @@ -119,12 +119,8 @@ func (s *AdvancedVisibilitySuite) SetupSuite() { s.updateMaxResultWindow() } - clientAddr := "127.0.0.1:7134" - if testcore.TestFlags.FrontendAddr != "" { - clientAddr = testcore.TestFlags.FrontendAddr - } sdkClient, err := sdkclient.Dial(sdkclient.Options{ - HostPort: clientAddr, + HostPort: s.FrontendGRPCAddress(), Namespace: s.Namespace(), }) if err != nil { @@ -132,7 +128,7 @@ func (s *AdvancedVisibilitySuite) SetupSuite() { } s.sdkClient = sdkClient sysSDKClient, err := sdkclient.Dial(sdkclient.Options{ - HostPort: clientAddr, + HostPort: s.FrontendGRPCAddress(), Namespace: primitives.SystemLocalNamespace, }) if err != nil { diff --git a/tests/visibility/advanced_visibility_test.go b/tests/visibility/advanced_visibility_test.go index 6b344c2a69e..06fdfb9c1d6 100644 --- a/tests/visibility/advanced_visibility_test.go +++ b/tests/visibility/advanced_visibility_test.go @@ -32,6 +32,7 @@ import ( ) func TestAdvancedVisibilitySuite(t *testing.T) { + t.Parallel() flag.Parse() suite.Run(t, new(AdvancedVisibilitySuite)) } diff --git a/tests/visibility/workflow_visibility_test.go b/tests/visibility/workflow_visibility_test.go index 80b37a937f2..791d583c359 100644 --- a/tests/visibility/workflow_visibility_test.go +++ b/tests/visibility/workflow_visibility_test.go @@ -31,5 +31,6 @@ import ( ) func TestWorkflowVisibilityTestSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(WorkflowVisibilityTestSuite)) } diff --git a/tests/workflow_buffered_events_test.go b/tests/workflow_buffered_events_test.go index 7a809029542..0c2bf60d843 100644 --- a/tests/workflow_buffered_events_test.go +++ b/tests/workflow_buffered_events_test.go @@ -31,5 +31,6 @@ import ( ) func TestWorkflowBufferedEventsTestSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(WorkflowBufferedEventsTestSuite)) } diff --git a/tests/workflow_delete_execution_test.go b/tests/workflow_delete_execution_test.go index 87f56772b5e..f4ab4b9dbc6 100644 --- a/tests/workflow_delete_execution_test.go +++ b/tests/workflow_delete_execution_test.go @@ -31,5 +31,6 @@ import ( ) func TestWorkflowDeleteExecutionSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(WorkflowDeleteExecutionSuite)) } diff --git a/tests/workflow_failures_test.go b/tests/workflow_failures_test.go index df16495e222..68633969071 100644 --- a/tests/workflow_failures_test.go +++ b/tests/workflow_failures_test.go @@ -31,5 +31,6 @@ import ( ) func TestWorkflowFailuresTestSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(WorkflowFailuresTestSuite)) } diff --git a/tests/workflow_memo_test.go b/tests/workflow_memo_test.go index de54bd95e74..d696333d5d4 100644 --- a/tests/workflow_memo_test.go +++ b/tests/workflow_memo_test.go @@ -31,5 +31,6 @@ import ( ) func TestWorkflowMemoTestSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(WorkflowMemoTestSuite)) } diff --git a/tests/workflow_task_test.go b/tests/workflow_task_test.go index 3a6e98a8257..87fddb9928e 100644 --- a/tests/workflow_task_test.go +++ b/tests/workflow_task_test.go @@ -31,5 +31,6 @@ import ( ) func TestWorkflowTaskTestSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(WorkflowTaskTestSuite)) } diff --git a/tests/workflow_test.go b/tests/workflow_test.go index ed00a4cdbfb..bcd91613fea 100644 --- a/tests/workflow_test.go +++ b/tests/workflow_test.go @@ -31,5 +31,6 @@ import ( ) func TestWorkflowTestSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(WorkflowTestSuite)) } diff --git a/tests/workflow_timer_test.go b/tests/workflow_timer_test.go index 9bcfe35bfdc..63b04a488a3 100644 --- a/tests/workflow_timer_test.go +++ b/tests/workflow_timer_test.go @@ -31,5 +31,6 @@ import ( ) func TestWorkflowTimerTestSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(WorkflowTimerTestSuite)) } diff --git a/tests/xdc/advanced_visibility_test.go b/tests/xdc/advanced_visibility_test.go index 063e564e195..89e16bf3f70 100644 --- a/tests/xdc/advanced_visibility_test.go +++ b/tests/xdc/advanced_visibility_test.go @@ -87,6 +87,7 @@ type AdvVisCrossDCTestSuite struct { } func TestAdvVisCrossDCTestSuite(t *testing.T) { + t.Parallel() flag.Parse() suite.Run(t, new(AdvVisCrossDCTestSuite)) } diff --git a/tests/xdc/base.go b/tests/xdc/base.go index 33d2e99555b..7596d79654e 100644 --- a/tests/xdc/base.go +++ b/tests/xdc/base.go @@ -30,7 +30,6 @@ package xdc import ( "context" - "fmt" "os" "sync" "time" @@ -122,15 +121,12 @@ func (s *xdcBaseSuite) setupSuite(clusterNames []string, opts ...testcore.Option clusterConfigs[i].ClusterMetadata.MasterClusterName = s.clusterNames[i] clusterConfigs[i].ClusterMetadata.CurrentClusterName = s.clusterNames[i] clusterConfigs[i].Persistence.DBName = "func_" + s.clusterNames[i] - clusterConfigs[i].ClusterMetadata.ClusterInformation = make(map[string]cluster.ClusterInformation) - // TODO: make tests.temporalImpl actually use these ports. Right now, we're just setting these to the values - // that the tests.temporalImpl uses by default, so that our info here is right, but these aren't actually used - // by NewCluster. - clusterConfigs[i].ClusterMetadata.ClusterInformation[s.clusterNames[i]] = cluster.ClusterInformation{ - Enabled: true, - InitialFailoverVersion: int64(i + 1), - RPCAddress: fmt.Sprintf("127.0.%d.1:7134", i), - HTTPAddress: fmt.Sprintf("127.0.%d.1:7144", i), + clusterConfigs[i].ClusterMetadata.ClusterInformation = map[string]cluster.ClusterInformation{ + s.clusterNames[i]: cluster.ClusterInformation{ + Enabled: true, + InitialFailoverVersion: int64(i + 1), + // RPCAddress and HTTPAddress will be filled in + }, } clusterConfigs[i].ServiceFxOptions = params.ServiceOptions clusterConfigs[i].EnableMetricsCapture = true @@ -146,13 +142,11 @@ func (s *xdcBaseSuite) setupSuite(clusterNames []string, opts ...testcore.Option s.startTime = time.Now() - cluster1Info := clusterConfigs[0].ClusterMetadata.ClusterInformation[clusterConfigs[0].ClusterMetadata.CurrentClusterName] - cluster2Info := clusterConfigs[1].ClusterMetadata.ClusterInformation[clusterConfigs[1].ClusterMetadata.CurrentClusterName] _, err = s.cluster1.AdminClient().AddOrUpdateRemoteCluster( testcore.NewContext(), &adminservice.AddOrUpdateRemoteClusterRequest{ - FrontendAddress: cluster2Info.RPCAddress, - FrontendHttpAddress: cluster2Info.HTTPAddress, + FrontendAddress: s.cluster2.Host().RemoteFrontendGRPCAddress(), + FrontendHttpAddress: s.cluster2.Host().FrontendHTTPAddress(), EnableRemoteClusterConnection: true, }) s.Require().NoError(err) @@ -160,8 +154,8 @@ func (s *xdcBaseSuite) setupSuite(clusterNames []string, opts ...testcore.Option _, err = s.cluster2.AdminClient().AddOrUpdateRemoteCluster( testcore.NewContext(), &adminservice.AddOrUpdateRemoteClusterRequest{ - FrontendAddress: cluster1Info.RPCAddress, - FrontendHttpAddress: cluster1Info.HTTPAddress, + FrontendAddress: s.cluster1.Host().RemoteFrontendGRPCAddress(), + FrontendHttpAddress: s.cluster1.Host().FrontendHTTPAddress(), EnableRemoteClusterConnection: true, }) s.Require().NoError(err) diff --git a/tests/xdc/failover_test.go b/tests/xdc/failover_test.go index 05257ca6141..5dabe5859c4 100644 --- a/tests/xdc/failover_test.go +++ b/tests/xdc/failover_test.go @@ -75,6 +75,7 @@ type ( ) func TestFuncClustersTestSuite(t *testing.T) { + t.Parallel() flag.Parse() suite.Run(t, new(FunctionalClustersTestSuite)) } diff --git a/tests/xdc/history_replication_dlq_test.go b/tests/xdc/history_replication_dlq_test.go index eb8910582c0..2872ecc211b 100644 --- a/tests/xdc/history_replication_dlq_test.go +++ b/tests/xdc/history_replication_dlq_test.go @@ -131,6 +131,7 @@ type ( ) func TestHistoryReplicationDLQSuite(t *testing.T) { + t.Parallel() flag.Parse() for _, tc := range []struct { name string diff --git a/tests/xdc/history_replication_signals_and_updates_test.go b/tests/xdc/history_replication_signals_and_updates_test.go index e2cf72e41ba..88c2ed2f75e 100644 --- a/tests/xdc/history_replication_signals_and_updates_test.go +++ b/tests/xdc/history_replication_signals_and_updates_test.go @@ -125,6 +125,7 @@ const ( ) func TestHistoryReplicationSignalsAndUpdatesTestSuite(t *testing.T) { + t.Parallel() flag.Parse() suite.Run(t, new(hrsuTestSuite)) } diff --git a/tests/xdc/nexus_request_forwarding_test.go b/tests/xdc/nexus_request_forwarding_test.go index 65f0c30cfa4..9b7e3560769 100644 --- a/tests/xdc/nexus_request_forwarding_test.go +++ b/tests/xdc/nexus_request_forwarding_test.go @@ -66,6 +66,7 @@ type NexusRequestForwardingSuite struct { } func TestNexusRequestForwardingTestSuite(t *testing.T) { + t.Parallel() flag.Parse() suite.Run(t, new(NexusRequestForwardingSuite)) } diff --git a/tests/xdc/nexus_state_replication_test.go b/tests/xdc/nexus_state_replication_test.go index 5e427663f2b..fee7e5bb60b 100644 --- a/tests/xdc/nexus_state_replication_test.go +++ b/tests/xdc/nexus_state_replication_test.go @@ -63,6 +63,7 @@ type NexusStateReplicationSuite struct { } func TestNexusStateReplicationTestSuite(t *testing.T) { + t.Parallel() flag.Parse() suite.Run(t, new(NexusStateReplicationSuite)) } diff --git a/tests/xdc/stream_based_replication_test.go b/tests/xdc/stream_based_replication_test.go index 44c60c9cca1..473d34ad2a2 100644 --- a/tests/xdc/stream_based_replication_test.go +++ b/tests/xdc/stream_based_replication_test.go @@ -75,6 +75,7 @@ type ( ) func TestStreamBasedReplicationTestSuite(t *testing.T) { + t.Parallel() suite.Run(t, new(streamBasedReplicationTestSuite)) } diff --git a/tests/xdc/user_data_replication_test.go b/tests/xdc/user_data_replication_test.go index ed83d5029b3..42869a161e6 100644 --- a/tests/xdc/user_data_replication_test.go +++ b/tests/xdc/user_data_replication_test.go @@ -66,6 +66,7 @@ type ( ) func TestUserDataReplicationTestSuite(t *testing.T) { + t.Parallel() flag.Parse() suite.Run(t, new(UserDataReplicationTestSuite)) }