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

Rename host tests to functional tests #3782

Merged
merged 7 commits into from
Jan 11, 2023
Merged
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
99 changes: 46 additions & 53 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ endef

TEST_TIMEOUT := 20m

# TODO: INTEG_TEST should be functional tests
INTEG_TEST_ROOT := ./host
INTEG_TEST_XDC_ROOT := ./host/xdc
INTEG_TEST_NDC_ROOT := ./host/ndc

PERSISTENCE_INTEGRATION_TEST_ROOT := ./common/persistence/tests
DB_TOOL_INTEGRATION_TEST_ROOT := ./tools/tests

PROTO_ROOT := proto
PROTO_FILES = $(shell find ./$(PROTO_ROOT)/internal -name "*.proto")
Expand All @@ -76,10 +69,15 @@ PROTO_OUT := api
ALL_SRC := $(shell find . -name "*.go")
ALL_SRC += go.mod
ALL_SCRIPTS := $(shell find . -name "*.sh")
# TODO (jeremy): Replace below with build tags and `go test ./...` for targets

TEST_DIRS := $(sort $(dir $(filter %_test.go,$(ALL_SRC))))
INTEG_TEST_DIRS := $(filter $(INTEG_TEST_ROOT)/ $(INTEG_TEST_NDC_ROOT)/,$(TEST_DIRS))
UNIT_TEST_DIRS := $(filter-out $(INTEG_TEST_ROOT)% $(INTEG_TEST_XDC_ROOT)% $(INTEG_TEST_NDC_ROOT)% $(PERSISTENCE_INTEGRATION_TEST_ROOT)% $(DB_TOOL_INTEGRATION_TEST_ROOT)%,$(TEST_DIRS))
FUNCTIONAL_TEST_ROOT := ./tests
FUNCTIONAL_TEST_XDC_ROOT := ./tests/xdc
FUNCTIONAL_TEST_NDC_ROOT := ./tests/ndc
DB_INTEGRATION_TEST_ROOT := ./common/persistence/tests
DB_TOOL_INTEGRATION_TEST_ROOT := ./tools/tests
INTEGRATION_TEST_DIRS := $(DB_INTEGRATION_TEST_ROOT) $(DB_TOOL_INTEGRATION_TEST_ROOT)
UNIT_TEST_DIRS := $(filter-out $(FUNCTIONAL_TEST_ROOT)% $(FUNCTIONAL_TEST_XDC_ROOT)% $(FUNCTIONAL_TEST_NDC_ROOT)% $(DB_INTEGRATION_TEST_ROOT)% $(DB_TOOL_INTEGRATION_TEST_ROOT)%,$(TEST_DIRS))

# go.opentelemetry.io/otel/sdk/[email protected] - there are breaking changes in v0.32.0.
# github.com/urfave/cli/[email protected] - needs to accept comma in values before unlocking https://github.com/urfave/cli/pull/1241.
Expand All @@ -89,26 +87,26 @@ PINNED_DEPENDENCIES := \
github.com/urfave/cli/[email protected]

# Code coverage output files.
COVER_ROOT := ./.coverage
UNIT_COVER_PROFILE := $(COVER_ROOT)/unit_coverprofile.out
INTEGRATION_COVER_PROFILE := $(COVER_ROOT)/integration_coverprofile.out
DB_TOOL_COVER_PROFILE := $(COVER_ROOT)/db_tool_coverprofile.out
INTEG_COVER_PROFILE := $(COVER_ROOT)/integ_$(PERSISTENCE_DRIVER)_coverprofile.out
INTEG_XDC_COVER_PROFILE := $(COVER_ROOT)/integ_xdc_$(PERSISTENCE_DRIVER)_coverprofile.out
INTEG_NDC_COVER_PROFILE := $(COVER_ROOT)/integ_ndc_$(PERSISTENCE_DRIVER)_coverprofile.out
SUMMARY_COVER_PROFILE := $(COVER_ROOT)/summary.out
COVER_ROOT := ./.coverage
UNIT_COVER_PROFILE := $(COVER_ROOT)/unit_coverprofile.out
INTEGRATION_COVER_PROFILE := $(COVER_ROOT)/integration_coverprofile.out
DB_TOOL_COVER_PROFILE := $(COVER_ROOT)/db_tool_coverprofile.out
FUNCTIONAL_COVER_PROFILE := $(COVER_ROOT)/functional_$(PERSISTENCE_DRIVER)_coverprofile.out
FUNCTIONAL_XDC_COVER_PROFILE := $(COVER_ROOT)/functional_xdc_$(PERSISTENCE_DRIVER)_coverprofile.out
FUNCTIONAL_NDC_COVER_PROFILE := $(COVER_ROOT)/functional_ndc_$(PERSISTENCE_DRIVER)_coverprofile.out
SUMMARY_COVER_PROFILE := $(COVER_ROOT)/summary.out

# DB
SQL_USER ?= temporal
SQL_PASSWORD ?= temporal

# Need the following option to have integration tests count towards coverage. godoc below:
# Need the following option to have integration and functional tests count towards coverage. godoc below:
# -coverpkg pkg1,pkg2,pkg3
# Apply coverage analysis in each test to the given list of packages.
# The default is for each test to analyze only the package being tested.
# Packages are specified as import paths.
INTEG_TEST_COVERPKG := -coverpkg="$(MODULE_ROOT)/client/...,$(MODULE_ROOT)/common/...,$(MODULE_ROOT)/service/..."

INTEGRATION_TEST_COVERPKG := -coverpkg="$(MODULE_ROOT)/common/persistence/...,$(MODULE_ROOT)/tools/..."
FUNCTIONAL_TEST_COVERPKG := -coverpkg="$(MODULE_ROOT)/client/...,$(MODULE_ROOT)/common/...,$(MODULE_ROOT)/service/...,$(MODULE_ROOT)/temporal/...,$(MODULE_ROOT)/tools/..."
##### Tools #####
update-checkers:
@printf $(COLOR) "Install/update check tools..."
Expand Down Expand Up @@ -262,32 +260,31 @@ build-tests:

unit-test: clean-test-results
@printf $(COLOR) "Run unit tests..."
@go test $(UNIT_TEST_DIRS) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race | tee -a test.log
@go test $(UNIT_TEST_DIRS) -timeout=$(TEST_TIMEOUT) $(TEST_DIRS) -race | tee -a test.log
Copy link
Member

@alexshtin alexshtin Jan 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@go test $(UNIT_TEST_DIRS) -timeout=$(TEST_TIMEOUT) $(TEST_DIRS) -race | tee -a test.log
@go test $(UNIT_TEST_DIRS) -timeout=$(TEST_TIMEOUT) $(TEST_DIRS) $(TEST_TAG) -race | tee -a test.log

TEST_TAG is to pass custom test tags as parameter if needed.

@! grep -q "^--- FAIL" test.log

db-integration-test: clean-test-results
integration-test: clean-test-results
@printf $(COLOR) "Run integration tests..."
@go test $(PERSISTENCE_INTEGRATION_TEST_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) | tee -a test.log
@go test $(DB_TOOL_INTEGRATION_TEST_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) | tee -a test.log
@go test $(INTEGRATION_TEST_DIRS) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race | tee -a test.log
@! grep -q "^--- FAIL" test.log

# TODO: rename it to functional-test
integration-test: clean-test-results
@printf $(COLOR) "Run integration tests..."
@go test $(INTEG_TEST_DIRS) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race | tee -a test.log
functional-test: clean-test-results
@printf $(COLOR) "Run functional tests..."
@go test $(FUNCTIONAL_TEST_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race | tee -a test.log
@go test $(FUNCTIONAL_TEST_NDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race | tee -a test.log
# Need to run xdc tests with race detector off because of ringpop bug causing data race issue.
@go test $(INTEG_TEST_XDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) | tee -a test.log
@go test $(FUNCTIONAL_TEST_XDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) | tee -a test.log
@! grep -q "^--- FAIL" test.log

# TODO: rename it to functional-test
integration-with-fault-injection-test: clean-test-results
functional-with-fault-injection-test: clean-test-results
@printf $(COLOR) "Run integration tests with fault injection..."
@go test $(INTEG_TEST_DIRS) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race -PersistenceFaultInjectionRate=0.005 | tee -a test.log
@go test $(FUNCTIONAL_TEST_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race -PersistenceFaultInjectionRate=0.005 | tee -a test.log
@go test $(FUNCTIONAL_TEST_NDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race -PersistenceFaultInjectionRate=0.005 | tee -a test.log
# Need to run xdc tests with race detector off because of ringpop bug causing data race issue.
@go test $(INTEG_TEST_XDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -PersistenceFaultInjectionRate=0.005 | tee -a test.log
@go test $(FUNCTIONAL_TEST_XDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -PersistenceFaultInjectionRate=0.005 | tee -a test.log
@! grep -q "^--- FAIL" test.log

test: unit-test db-integration-test integration-test integration-with-fault-injection-test
test: unit-test integration-test functional-test functional-with-fault-injection-test

##### Coverage #####
$(COVER_ROOT):
Expand All @@ -296,27 +293,23 @@ $(COVER_ROOT):
unit-test-coverage: $(COVER_ROOT)
@printf $(COLOR) "Run unit tests with coverage..."
@echo "mode: atomic" > $(UNIT_COVER_PROFILE)
@go test ./$(UNIT_TEST_DIRS) -timeout=$(TEST_TIMEOUT) -race -coverprofile=$(UNIT_COVER_PROFILE) || exit 1;
@go test ./$(UNIT_TEST_DIRS) -timeout=$(TEST_TIMEOUT) -race -tags=unittest -coverprofile=$(UNIT_COVER_PROFILE) || exit 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@go test ./$(UNIT_TEST_DIRS) -timeout=$(TEST_TIMEOUT) -race -tags=unittest -coverprofile=$(UNIT_COVER_PROFILE) || exit 1;
@go test ./$(UNIT_TEST_DIRS) -timeout=$(TEST_TIMEOUT) -race -coverprofile=$(UNIT_COVER_PROFILE) || exit 1;


db-integration-test-coverage: $(COVER_ROOT)
integration-test-coverage: $(COVER_ROOT)
@printf $(COLOR) "Run integration tests with coverage..."
@go test $(PERSISTENCE_INTEGRATION_TEST_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -coverpkg="./common/..." -coverprofile=$(INTEGRATION_COVER_PROFILE)
@go test $(DB_TOOL_INTEGRATION_TEST_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -coverpkg="./tools/..." -coverprofile=$(DB_TOOL_COVER_PROFILE)
@go test $(INTEGRATION_TEST_DIRS) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) $(INTEGRATION_TEST_COVERPKG) -coverprofile=$(INTEGRATION_COVER_PROFILE)

# TODO: rename it to functional-test
integration-test-coverage: $(COVER_ROOT)
@printf $(COLOR) "Run integration tests with coverage with $(PERSISTENCE_DRIVER) driver..."
@go test $(INTEG_TEST_ROOT) -timeout=$(TEST_TIMEOUT) -race $(TEST_TAG) -persistenceType=$(PERSISTENCE_TYPE) -persistenceDriver=$(PERSISTENCE_DRIVER) $(INTEG_TEST_COVERPKG) -coverprofile=$(INTEG_COVER_PROFILE)

# TODO: rename it to functional-test
integration-test-xdc-coverage: $(COVER_ROOT)
@printf $(COLOR) "Run integration test for cross DC with coverage with $(PERSISTENCE_DRIVER) driver..."
@go test $(INTEG_TEST_XDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -persistenceType=$(PERSISTENCE_TYPE) -persistenceDriver=$(PERSISTENCE_DRIVER) $(INTEG_TEST_COVERPKG) -coverprofile=$(INTEG_XDC_COVER_PROFILE)

# TODO: rename it to functional-test
integration-test-ndc-coverage: $(COVER_ROOT)
@printf $(COLOR) "Run integration test for NDC with coverage with $(PERSISTENCE_DRIVER) driver..."
@go test $(INTEG_TEST_NDC_ROOT) -timeout=$(TEST_TIMEOUT) -race $(TEST_TAG) -persistenceType=$(PERSISTENCE_TYPE) -persistenceDriver=$(PERSISTENCE_DRIVER) $(INTEG_TEST_COVERPKG) -coverprofile=$(INTEG_NDC_COVER_PROFILE)
functional-test-coverage: $(COVER_ROOT)
@printf $(COLOR) "Run functional tests with coverage with $(PERSISTENCE_DRIVER) driver..."
@go test $(FUNCTIONAL_TEST_ROOT) -timeout=$(TEST_TIMEOUT) -race $(TEST_TAG) -persistenceType=$(PERSISTENCE_TYPE) -persistenceDriver=$(PERSISTENCE_DRIVER) $(FUNCTIONAL_TEST_COVERPKG) -coverprofile=$(FUNCTIONAL_COVER_PROFILE)

functional-test-xdc-coverage: $(COVER_ROOT)
@printf $(COLOR) "Run functional test for cross DC with coverage with $(PERSISTENCE_DRIVER) driver..."
@go test $(FUNCTIONAL_TEST_XDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -persistenceType=$(PERSISTENCE_TYPE) -persistenceDriver=$(PERSISTENCE_DRIVER) $(FUNCTIONAL_TEST_COVERPKG) -coverprofile=$(FUNCTIONAL_XDC_COVER_PROFILE)

functional-test-ndc-coverage: $(COVER_ROOT)
@printf $(COLOR) "Run functional test for NDC with coverage with $(PERSISTENCE_DRIVER) driver..."
@go test $(FUNCTIONAL_TEST_NDC_ROOT) -timeout=$(TEST_TIMEOUT) -race $(TEST_TAG) -persistenceType=$(PERSISTENCE_TYPE) -persistenceDriver=$(PERSISTENCE_DRIVER) $(FUNCTIONAL_TEST_COVERPKG) -coverprofile=$(FUNCTIONAL_NDC_COVER_PROFILE)

.PHONY: $(SUMMARY_COVER_PROFILE)
$(SUMMARY_COVER_PROFILE): $(COVER_ROOT)
Expand Down
6 changes: 3 additions & 3 deletions common/archiver/filestore/historyArchiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (

enumspb "go.temporal.io/api/enums/v1"

"go.temporal.io/server/tests/testhelper"
"go.temporal.io/server/tests/testutils"

"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -355,7 +355,7 @@ func (s *historyArchiverSuite) TestArchive_Success() {
historyIterator.EXPECT().HasNext().Return(false),
)

dir := testhelper.MkdirTemp(s.T(), "", "TestArchiveSingleRead")
dir := testutils.MkdirTemp(s.T(), "", "TestArchiveSingleRead")

historyArchiver := s.newTestHistoryArchiver(historyIterator)
request := &archiver.ArchiveHistoryRequest{
Expand Down Expand Up @@ -538,7 +538,7 @@ func (s *historyArchiverSuite) TestArchiveAndGet() {
historyIterator.EXPECT().HasNext().Return(false),
)

dir := testhelper.MkdirTemp(s.T(), "", "TestArchiveAndGet")
dir := testutils.MkdirTemp(s.T(), "", "TestArchiveAndGet")

historyArchiver := s.newTestHistoryArchiver(historyIterator)
archiveRequest := &archiver.ArchiveHistoryRequest{
Expand Down
17 changes: 8 additions & 9 deletions common/archiver/filestore/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ import (
"testing"
"time"

"go.temporal.io/server/tests/testhelper"

"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
enumspb "go.temporal.io/api/enums/v1"
Expand All @@ -40,6 +38,7 @@ import (
"go.temporal.io/server/common"
"go.temporal.io/server/common/archiver"
"go.temporal.io/server/common/codec"
"go.temporal.io/server/tests/testutils"
)

const (
Expand All @@ -61,7 +60,7 @@ func (s *UtilSuite) SetupTest() {
}

func (s *UtilSuite) TestFileExists() {
dir := testhelper.MkdirTemp(s.T(), "", "TestFileExists")
dir := testutils.MkdirTemp(s.T(), "", "TestFileExists")
s.assertDirectoryExists(dir)

exists, err := fileExists(dir)
Expand All @@ -80,7 +79,7 @@ func (s *UtilSuite) TestFileExists() {
}

func (s *UtilSuite) TestDirectoryExists() {
dir := testhelper.MkdirTemp(s.T(), "", "TestDirectoryExists")
dir := testutils.MkdirTemp(s.T(), "", "TestDirectoryExists")
s.assertDirectoryExists(dir)

subdir := "subdir"
Expand All @@ -97,7 +96,7 @@ func (s *UtilSuite) TestDirectoryExists() {
}

func (s *UtilSuite) TestMkdirAll() {
dir := testhelper.MkdirTemp(s.T(), "", "TestMkdirAll")
dir := testutils.MkdirTemp(s.T(), "", "TestMkdirAll")
s.assertDirectoryExists(dir)

s.NoError(mkdirAll(dir, testDirMode))
Expand All @@ -116,7 +115,7 @@ func (s *UtilSuite) TestMkdirAll() {
}

func (s *UtilSuite) TestWriteFile() {
dir := testhelper.MkdirTemp(s.T(), "", "TestWriteFile")
dir := testutils.MkdirTemp(s.T(), "", "TestWriteFile")
s.assertDirectoryExists(dir)

filename := "test-file-name"
Expand All @@ -134,7 +133,7 @@ func (s *UtilSuite) TestWriteFile() {
}

func (s *UtilSuite) TestReadFile() {
dir := testhelper.MkdirTemp(s.T(), "", "TestReadFile")
dir := testutils.MkdirTemp(s.T(), "", "TestReadFile")
s.assertDirectoryExists(dir)

filename := "test-file-name"
Expand All @@ -151,7 +150,7 @@ func (s *UtilSuite) TestReadFile() {
}

func (s *UtilSuite) TestListFilesByPrefix() {
dir := testhelper.MkdirTemp(s.T(), "", "TestListFiles")
dir := testutils.MkdirTemp(s.T(), "", "TestListFiles")
s.assertDirectoryExists(dir)

filename := "test-file-name"
Expand Down Expand Up @@ -214,7 +213,7 @@ func (s *UtilSuite) TestEncodeDecodeHistoryBatches() {
}

func (s *UtilSuite) TestValidateDirPath() {
dir := testhelper.MkdirTemp(s.T(), "", "TestValidateDirPath")
dir := testutils.MkdirTemp(s.T(), "", "TestValidateDirPath")
s.assertDirectoryExists(dir)
filename := "test-file-name"
s.createFile(dir, filename)
Expand Down
7 changes: 3 additions & 4 deletions common/archiver/filestore/visibilityArchiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ import (
"testing"
"time"

"go.temporal.io/server/tests/testhelper"

"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand All @@ -51,6 +49,7 @@ import (
"go.temporal.io/server/common/log"
"go.temporal.io/server/common/payload"
"go.temporal.io/server/common/primitives/timestamp"
"go.temporal.io/server/tests/testutils"
)

const (
Expand Down Expand Up @@ -166,7 +165,7 @@ func (s *visibilityArchiverSuite) TestArchive_Fail_NonRetryableErrorOption() {
}

func (s *visibilityArchiverSuite) TestArchive_Success() {
dir := testhelper.MkdirTemp(s.T(), "", "TestVisibilityArchive")
dir := testutils.MkdirTemp(s.T(), "", "TestVisibilityArchive")

visibilityArchiver := s.newTestVisibilityArchiver()
closeTimestamp := timestamp.TimeNowPtrUtc()
Expand Down Expand Up @@ -472,7 +471,7 @@ func (s *visibilityArchiverSuite) TestQuery_Success_SmallPageSize() {
}

func (s *visibilityArchiverSuite) TestArchiveAndQuery() {
dir := testhelper.MkdirTemp(s.T(), "", "TestArchiveAndQuery")
dir := testutils.MkdirTemp(s.T(), "", "TestArchiveAndQuery")

visibilityArchiver := s.newTestVisibilityArchiver()
mockParser := NewMockQueryParser(s.controller)
Expand Down
8 changes: 4 additions & 4 deletions common/config/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ import (
"os"
"testing"

"go.temporal.io/server/tests/testhelper"

"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"

"go.temporal.io/server/tests/testutils"
)

const fileMode = os.FileMode(0644)
Expand Down Expand Up @@ -61,7 +61,7 @@ func (s *LoaderSuite) SetupTest() {
}

func (s *LoaderSuite) TestBaseYaml() {
dir := testhelper.MkdirTemp(s.T(), "", "loader.testBaseYaml")
dir := testutils.MkdirTemp(s.T(), "", "loader.testBaseYaml")

data := buildConfig("", "")
err := os.WriteFile(path(dir, "base.yaml"), []byte(data), fileMode)
Expand All @@ -82,7 +82,7 @@ func (s *LoaderSuite) TestBaseYaml() {
}

func (s *LoaderSuite) TestHierarchy() {
dir := testhelper.MkdirTemp(s.T(), "", "loader.testHierarchy")
dir := testutils.MkdirTemp(s.T(), "", "loader.testHierarchy")

s.createFile(dir, "base.yaml", "", "")
s.createFile(dir, "development.yaml", "development", "")
Expand Down
5 changes: 2 additions & 3 deletions common/log/zap_logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,13 @@ import (
"strings"
"testing"

"go.temporal.io/server/tests/testhelper"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"go.uber.org/zap"

"go.temporal.io/server/common/log/tag"
"go.temporal.io/server/tests/testutils"
)

type LogSuite struct {
Expand Down Expand Up @@ -68,7 +67,7 @@ func (s *LogSuite) TestParseLogLevel() {
}

func (s *LogSuite) TestNewLogger() {
dir := testhelper.MkdirTemp(s.T(), "", "config.testNewLogger")
dir := testutils.MkdirTemp(s.T(), "", "config.testNewLogger")

cfg := Config{
Level: "info",
Expand Down
4 changes: 2 additions & 2 deletions common/persistence/cassandra/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
"go.temporal.io/server/common/persistence/nosql/nosqlplugin/cassandra/gocql"
"go.temporal.io/server/common/resolver"
"go.temporal.io/server/environment"
"go.temporal.io/server/tests/testhelper"
"go.temporal.io/server/tests/testutils"
)

const (
Expand Down Expand Up @@ -109,7 +109,7 @@ func (s *TestCluster) SetupTestDatabase() {
schemaDir := s.schemaDir + "/"

if !strings.HasPrefix(schemaDir, "/") && !strings.HasPrefix(schemaDir, "../") {
temporalPackageDir := testhelper.GetRepoRootDirectory()
temporalPackageDir := testutils.GetRepoRootDirectory()
schemaDir = path.Join(temporalPackageDir, schemaDir)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import (
enumspb "go.temporal.io/api/enums/v1"
historypb "go.temporal.io/api/history/v1"
"go.temporal.io/api/serviceerror"

"go.temporal.io/server/common/persistence/serialization"

persistencespb "go.temporal.io/server/api/persistence/v1"
Expand Down
Loading