Skip to content

Commit

Permalink
Add race-check target to Makefile. Closes #710
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Pombeiro committed Mar 27, 2018
1 parent 88f881c commit e264910
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
22 changes: 13 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ XGOIMAGE = statusteam/xgo:$(XGOVERSION)
XGOIMAGEIOSSIM = statusteam/xgo-ios-simulator:$(XGOVERSION)

networkid ?= StatusChain
e2e_extraflags =

DOCKER_IMAGE_NAME ?= statusteam/status-go

DOCKER_TEST_WORKDIR = /go/src/github.com/status-im/status-go/
DOCKER_TEST_IMAGE = golang:1.9
DOCKER_TEST_IMAGE = golang:1.9

UNIT_TEST_PACKAGES := $(shell go list ./... | grep -v /vendor | grep -v /t/e2e | grep -v /t/destructive | grep -v /cmd | grep -v /lib)

Expand Down Expand Up @@ -130,15 +131,18 @@ test-unit-coverage: ##@tests Run unit and integration tests with coverage
test-e2e: ##@tests Run e2e tests
# order: reliability then alphabetical
# TODO(tiabc): make a single command out of them adding `-p 1` flag.
go test -timeout 5m ./t/e2e/accounts/... -network=$(networkid)
go test -timeout 5m ./t/e2e/api/... -network=$(networkid)
go test -timeout 5m ./t/e2e/node/... -network=$(networkid)
go test -timeout 50m ./t/e2e/jail/... -network=$(networkid)
go test -timeout 20m ./t/e2e/rpc/... -network=$(networkid)
go test -timeout 20m ./t/e2e/whisper/... -network=$(networkid)
go test -timeout 10m ./t/e2e/transactions/... -network=$(networkid)
go test -timeout 5m ./t/e2e/accounts/... -network=$(networkid) $(e2e_extraflags)
go test -timeout 5m ./t/e2e/api/... -network=$(networkid) $(e2e_extraflags)
go test -timeout 5m ./t/e2e/node/... -network=$(networkid) $(e2e_extraflags)
go test -timeout 50m ./t/e2e/jail/... -network=$(networkid) $(e2e_extraflags)
go test -timeout 20m ./t/e2e/rpc/... -network=$(networkid) $(e2e_extraflags)
go test -timeout 20m ./t/e2e/whisper/... -network=$(networkid) $(e2e_extraflags)
go test -timeout 10m ./t/e2e/transactions/... -network=$(networkid) $(e2e_extraflags)
# e2e_test tag is required to include some files from ./lib without _test suffix
go test -timeout 40m -tags e2e_test ./lib -network=$(networkid)
go test -timeout 40m -tags e2e_test ./lib -network=$(networkid) $(e2e_extraflags)

race-check: e2e_extraflags=-race ##@tests Run e2e tests with -race flag
race-check: test-e2e

lint-install:
go get -u github.com/alecthomas/gometalinter
Expand Down
2 changes: 1 addition & 1 deletion geth/params/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ var loadConfigTestCases = []struct {
require.True(t, nodeConfig.ClusterConfig.Enabled, "cluster configuration is expected to be enabled after loading file")

enodes := nodeConfig.ClusterConfig.StaticNodes
require.True(t, len(enodes) == 2)
require.Len(t, enodes, 2)
},
},
{
Expand Down
4 changes: 2 additions & 2 deletions t/e2e/whisper/whisper_mailbox_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ func (s *WhisperMailboxSuite) TestRequestMessageFromMailboxAsync() {
//Create message filter
messageFilterID := s.createPrivateChatMessageFilter(rpcClient, keyID, topic.String())

//Threre are no messages at filter
//There are no messages at filter
messages := s.getMessagesByMessageFilterID(rpcClient, messageFilterID)
s.Require().Equal(0, len(messages))

//Post message matching with filter (key and token)
//Post message matching with filter (key and topic)
s.postMessageToPrivate(rpcClient, pubkey.String(), topic.String(), hexutil.Encode([]byte("Hello world!")))

//Get message to make sure that it will come from the mailbox later
Expand Down

0 comments on commit e264910

Please sign in to comment.