99 "time"
1010
1111 "github.com/google/uuid"
12- "github.com/stretchr/testify/suite"
1312 commandpb "go.temporal.io/api/command/v1"
1413 commonpb "go.temporal.io/api/common/v1"
1514 enumspb "go.temporal.io/api/enums/v1"
@@ -21,21 +20,22 @@ import (
2120 "go.temporal.io/server/common/convert"
2221 "go.temporal.io/server/common/log/tag"
2322 "go.temporal.io/server/common/payloads"
23+ "go.temporal.io/server/common/testing/parallelsuite"
2424 "go.temporal.io/server/tests/testcore"
2525 "google.golang.org/protobuf/types/known/durationpb"
2626 "google.golang.org/protobuf/types/known/timestamppb"
2727)
2828
29- type WorkflowFailuresTestSuite struct {
30- testcore. FunctionalTestBase
29+ type WorkflowFailuresSuite struct {
30+ parallelsuite. Suite [ * WorkflowFailuresSuite ]
3131}
3232
3333func TestWorkflowFailuresTestSuite (t * testing.T ) {
34- t .Parallel ()
35- suite .Run (t , new (WorkflowFailuresTestSuite ))
34+ parallelsuite .Run (t , & WorkflowFailuresSuite {})
3635}
3736
38- func (s * WorkflowFailuresTestSuite ) TestWorkflowTimeout () {
37+ func (suite * WorkflowFailuresSuite ) TestWorkflowTimeout () {
38+ s := testcore .NewEnv (suite .T ())
3939 startTime := time .Now ().UTC ()
4040
4141 id := "functional-workflow-timeout"
@@ -112,7 +112,8 @@ ListClosedLoop:
112112 s .Equal (1 , closedCount )
113113}
114114
115- func (s * WorkflowFailuresTestSuite ) TestWorkflowTaskFailed () {
115+ func (suite * WorkflowFailuresSuite ) TestWorkflowTaskFailed () {
116+ s := testcore .NewEnv (suite .T ())
116117 id := "functional-workflowtask-failed-test"
117118 wt := "functional-workflowtask-failed-test-type"
118119 tl := "functional-workflowtask-failed-test-taskqueue"
@@ -319,7 +320,8 @@ func (s *WorkflowFailuresTestSuite) TestWorkflowTaskFailed() {
319320 s .GreaterOrEqual (wfCompletedEvent .GetEventTime ().AsTime ().Sub (lastWorkflowTaskTime ), time .Second )
320321}
321322
322- func (s * WorkflowFailuresTestSuite ) TestRespondWorkflowTaskCompleted_ReturnsErrorIfInvalidArgument () {
323+ func (suite * WorkflowFailuresSuite ) TestRespondWorkflowTaskCompletedReturnsErrorIfInvalidArgument () {
324+ s := testcore .NewEnv (suite .T ())
323325 id := "functional-respond-workflow-task-completed-test"
324326 wt := "functional-respond-workflow-task-completed-test-type"
325327 tq := "functional-respond-workflow-task-completed-test-taskqueue"
0 commit comments