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

Run top-level functional test suites in parallel #6595

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions tests/acquire_shard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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)
}
4 changes: 2 additions & 2 deletions tests/activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions tests/activity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
2 changes: 1 addition & 1 deletion tests/add_tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions tests/add_tasks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ import (
)

func TestAddTasksSuite(t *testing.T) {
t.Parallel()
suite.Run(t, new(AddTasksSuite))
}
1 change: 1 addition & 0 deletions tests/admin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ import (
)

func TestAdminTestSuite(t *testing.T) {
t.Parallel()
suite.Run(t, new(AdminTestSuite))
}
1 change: 1 addition & 0 deletions tests/archival_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (
)

func TestArchivalSuite(t *testing.T) {
t.Parallel()
flag.Parse()
s := new(ArchivalSuite)
dynamicConfigOverrides := map[dynamicconfig.Key]any{
Expand Down
3 changes: 2 additions & 1 deletion tests/callbacks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ type CallbacksSuite struct {
}

func TestCallbacksSuite(t *testing.T) {
t.Parallel()
suite.Run(t, new(CallbacksSuite))
}

Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions tests/cancel_workflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ import (
)

func TestCancelWorkflowSuite(t *testing.T) {
t.Parallel()
suite.Run(t, new(CancelWorkflowSuite))
}
1 change: 1 addition & 0 deletions tests/child_workflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ import (
)

func TestChildWorkflowSuite(t *testing.T) {
t.Parallel()
suite.Run(t, new(ChildWorkflowSuite))
}
2 changes: 1 addition & 1 deletion tests/client_data_converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
Expand Down
1 change: 1 addition & 0 deletions tests/client_data_converter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ import (
)

func TestClientDataConverterTestSuite(t *testing.T) {
t.Parallel()
suite.Run(t, new(ClientDataConverterTestSuite))
}
1 change: 1 addition & 0 deletions tests/client_misc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
)

func TestClientMiscTestSuite(t *testing.T) {
t.Parallel()
flag.Parse()
suite.Run(t, new(ClientMiscTestSuite))
}
1 change: 1 addition & 0 deletions tests/continue_as_new_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
)

func TestContinueAsNewTestSuite(t *testing.T) {
t.Parallel()
flag.Parse()
suite.Run(t, new(ContinueAsNewTestSuite))
}
1 change: 1 addition & 0 deletions tests/cron_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
)

func TestCronTestSuite(t *testing.T) {
t.Parallel()
flag.Parse()
suite.Run(t, new(CronTestSuite))
}
1 change: 1 addition & 0 deletions tests/describe_task_queue_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
)

func TestDescribeTaskQueueSuite(t *testing.T) {
t.Parallel()
flag.Parse()
suite.Run(t, new(DescribeTaskQueueSuite))
}
1 change: 1 addition & 0 deletions tests/describe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
)

func TestDescribeTestSuite(t *testing.T) {
t.Parallel()
flag.Parse()
suite.Run(t, new(DescribeTestSuite))
}
6 changes: 3 additions & 3 deletions tests/dlq.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions tests/dlq_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
)

func TestDLQSuite(t *testing.T) {
t.Parallel()
flag.Parse()
suite.Run(t, new(DLQSuite))
}
6 changes: 1 addition & 5 deletions tests/eager_workflow_start.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/eager_workflow_start_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ import (
)

func TestEagerWorkflowTestSuite(t *testing.T) {
t.Parallel()
suite.Run(t, new(EagerWorkflowTestSuite))
}
3 changes: 3 additions & 0 deletions tests/gethistory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
1 change: 1 addition & 0 deletions tests/http_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ type HttpApiTestSuite struct {
}

func TestHttpApiTestSuite(t *testing.T) {
t.Parallel()
suite.Run(t, new(HttpApiTestSuite))
}

Expand Down
1 change: 1 addition & 0 deletions tests/max_buffered_event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ import (
)

func TestMaxBufferedEventSuite(t *testing.T) {
t.Parallel()
suite.Run(t, new(MaxBufferedEventSuite))
}
1 change: 1 addition & 0 deletions tests/namespace/namespace_interceptor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ import (
)

func TestNamespaceInterceptorTestSuite(t *testing.T) {
t.Parallel()
suite.Run(t, new(NamespaceInterceptorTestSuite))
}
1 change: 1 addition & 0 deletions tests/ndc/ndc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ type (
)

func TestNDCFuncTestSuite(t *testing.T) {
// TODO: doesn't work yet: t.Parallel()
flag.Parse()
suite.Run(t, new(NDCFunctionalTestSuite))
}
Expand Down
1 change: 1 addition & 0 deletions tests/ndc/replication_migration_back_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ type (
)

func TestReplicationMigrationBackTest(t *testing.T) {
// TODO: doesn't work yet: t.Parallel()
flag.Parse()
suite.Run(t, new(ReplicationMigrationBackTestSuite))

Expand Down
1 change: 1 addition & 0 deletions tests/ndc/replication_task_batching_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ type (
)

func TestNDCReplicationTaskBatching(t *testing.T) {
// TODO: doesn't work yet: t.Parallel()
flag.Parse()
suite.Run(t, new(NDCReplicationTaskBatchingTestSuite))
}
Expand Down
1 change: 1 addition & 0 deletions tests/nexus/nexus_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ type NexusApiTestSuite struct {
}

func TestNexusApiTestSuite(t *testing.T) {
t.Parallel()
suite.Run(t, new(NexusApiTestSuite))

}
Expand Down
1 change: 1 addition & 0 deletions tests/nexus/nexus_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions tests/nexus/nexus_workflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ type NexusWorkflowTestSuite struct {
}

func TestNexusWorkflowTestSuite(t *testing.T) {
t.Parallel()
suite.Run(t, new(NexusWorkflowTestSuite))
}

Expand Down
1 change: 1 addition & 0 deletions tests/purge_dlq_tasks_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ import (
)

func TestPurgeDLQTasksSuite(t *testing.T) {
t.Parallel()
suite.Run(t, new(PurgeDLQTasksSuite))
}
1 change: 1 addition & 0 deletions tests/query_workflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ import (
)

func TestQueryWorkflowSuite(t *testing.T) {
t.Parallel()
suite.Run(t, new(QueryWorkflowSuite))
}
1 change: 1 addition & 0 deletions tests/relay_task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ import (
)

func TestRelayTaskTestSuite(t *testing.T) {
t.Parallel()
suite.Run(t, new(RelayTaskTestSuite))
}
2 changes: 1 addition & 1 deletion tests/schedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
Expand Down
1 change: 1 addition & 0 deletions tests/schedule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
)

func TestScheduleFunctionalSuite(t *testing.T) {
t.Parallel()
flag.Parse()
suite.Run(t, new(ScheduleFunctionalSuite))
}
1 change: 1 addition & 0 deletions tests/signal_workflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ import (
)

func TestSignalWorkflowTestSuite(t *testing.T) {
t.Parallel()
suite.Run(t, new(SignalWorkflowTestSuite))
}
1 change: 1 addition & 0 deletions tests/sizelimit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
)

func TestSizeLimitFunctionalSuite(t *testing.T) {
t.Parallel()
flag.Parse()
suite.Run(t, new(SizeLimitFunctionalSuite))
}
1 change: 1 addition & 0 deletions tests/stickytq_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ import (
)

func TestStickyTqTestSuite(t *testing.T) {
t.Parallel()
suite.Run(t, new(StickyTqTestSuite))
}
2 changes: 1 addition & 1 deletion tests/testcore/client_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 0 additions & 2 deletions tests/testcore/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import (

// TestFlags contains the feature flags for functional tests
var TestFlags struct {
FrontendAddr string
FrontendHTTPAddr string
PersistenceType string
PersistenceDriver string
Expand All @@ -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]")
Expand Down
Loading
Loading