Skip to content

Commit

Permalink
Always run all the versioning tests (temporalio#1510)
Browse files Browse the repository at this point in the history
  • Loading branch information
antlai-temporal committed Jun 12, 2024
1 parent a7c8208 commit 38fe879
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 46 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ jobs:
if: ${{ matrix.testDockerCompose }}
run: go run . integration-test
working-directory: ./internal/cmd/build
env:
RUN_VERSIONING_V2_TESTS: "true"

cloud-test:
strategy:
Expand Down
1 change: 1 addition & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,7 @@ type (
// When not supported by the server, it returns an empty [TaskQueueDescription] if there is no information
// about the task queue, or an error when the response identifies an unsupported server.
// Note that using a sticky queue as target is not supported.
// Also, workflow reachability status is eventually consistent, and it could take a few minutes to update.
// WARNING: Worker versioning is currently experimental, and requires server 1.24+
DescribeTaskQueueEnhanced(ctx context.Context, options DescribeTaskQueueEnhancedOptions) (TaskQueueDescription, error)

Expand Down
1 change: 1 addition & 0 deletions internal/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ type (
// When not supported by the server, it returns an empty [TaskQueueDescription] if there is no information
// about the task queue, or an error when the response identifies an unsupported server.
// Note that using a sticky queue as target is not supported.
// Also, workflow reachability status is eventually consistent, and it could take a few minutes to update.
// WARNING: Worker versioning is currently experimental, and requires server 1.24+
DescribeTaskQueueEnhanced(ctx context.Context, options DescribeTaskQueueEnhancedOptions) (TaskQueueDescription, error)

Expand Down
44 changes: 0 additions & 44 deletions test/worker_versioning_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ package test_test

import (
"context"
"os"
"testing"
"time"

Expand All @@ -39,13 +38,6 @@ import (
"go.temporal.io/sdk/worker"
)

var runNewVersioningTests bool

func init() {
run, ok := os.LookupEnv("RUN_VERSIONING_V2_TESTS")
runNewVersioningTests = ok && run != ""
}

type WorkerVersioningTestSuite struct {
*require.Assertions
suite.Suite
Expand Down Expand Up @@ -111,10 +103,6 @@ func (ts *WorkerVersioningTestSuite) TestManipulateVersionSets() {
}

func (ts *WorkerVersioningTestSuite) TestManipulateRules() {
if !runNewVersioningTests {
ts.T().Skip("temporal cli devserver does not support new versioning API yet.")
}

ctx, cancel := context.WithTimeout(context.Background(), ctxTimeout)
defer cancel()

Expand Down Expand Up @@ -181,10 +169,6 @@ func (ts *WorkerVersioningTestSuite) TestManipulateRules() {
}

func (ts *WorkerVersioningTestSuite) TestReplaceDeleteRules() {
if !runNewVersioningTests {
ts.T().Skip("temporal cli devserver does not support new versioning API yet.")
}

ctx, cancel := context.WithTimeout(context.Background(), ctxTimeout)
defer cancel()

Expand Down Expand Up @@ -277,10 +261,6 @@ func (ts *WorkerVersioningTestSuite) TestReplaceDeleteRules() {
}

func (ts *WorkerVersioningTestSuite) TestCommitRules() {
if !runNewVersioningTests {
ts.T().Skip("temporal cli devserver does not support new versioning API yet.")
}

ctx, cancel := context.WithTimeout(context.Background(), ctxTimeout)
defer cancel()

Expand Down Expand Up @@ -354,10 +334,6 @@ func (ts *WorkerVersioningTestSuite) TestCommitRules() {
}

func (ts *WorkerVersioningTestSuite) TestConflictTokens() {
if !runNewVersioningTests {
ts.T().Skip("temporal cli devserver does not support new versioning API yet.")
}

ctx, cancel := context.WithTimeout(context.Background(), ctxTimeout)
defer cancel()

Expand Down Expand Up @@ -467,10 +443,6 @@ func (ts *WorkerVersioningTestSuite) TestTwoWorkersGetDifferentTasks() {
}

func (ts *WorkerVersioningTestSuite) TestTwoWorkersGetDifferentTasksWithRules() {
if !runNewVersioningTests {
ts.T().Skip("temporal cli devserver does not support new versioning API yet.")
}

ctx, cancel := context.WithTimeout(context.Background(), ctxTimeout)
defer cancel()

Expand Down Expand Up @@ -558,10 +530,6 @@ func (ts *WorkerVersioningTestSuite) TestReachabilityUnreachable() {
}

func (ts *WorkerVersioningTestSuite) TestReachabilityUnreachableWithRules() {
if !runNewVersioningTests {
ts.T().Skip("temporal cli devserver does not support new versioning API yet.")
}

ctx, cancel := context.WithTimeout(context.Background(), ctxTimeout)
defer cancel()

Expand Down Expand Up @@ -624,10 +592,6 @@ func (ts *WorkerVersioningTestSuite) TestReachabilityUnversionedWorker() {
}

func (ts *WorkerVersioningTestSuite) TestReachabilityUnversionedWorkerWithRules() {
if !runNewVersioningTests {
ts.T().Skip("temporal cli devserver does not support new versioning API yet.")
}

ctx, cancel := context.WithTimeout(context.Background(), ctxTimeout)
defer cancel()

Expand Down Expand Up @@ -745,10 +709,6 @@ func (ts *WorkerVersioningTestSuite) TestReachabilityVersions() {
}

func (ts *WorkerVersioningTestSuite) TestReachabilityVersionsWithRules() {
if !runNewVersioningTests {
ts.T().Skip("temporal cli devserver does not support new versioning API yet.")
}

ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()

Expand Down Expand Up @@ -913,10 +873,6 @@ func (ts *WorkerVersioningTestSuite) TestBuildIDChangesOverWorkflowLifetime() {
}

func (ts *WorkerVersioningTestSuite) TestBuildIDChangesOverWorkflowLifetimeWithRules() {
if !runNewVersioningTests {
ts.T().Skip("temporal cli devserver does not support new versioning API yet.")
}

ctx, cancel := context.WithTimeout(context.Background(), ctxTimeout)
defer cancel()

Expand Down

0 comments on commit 38fe879

Please sign in to comment.