Skip to content
This repository was archived by the owner on Aug 15, 2022. It is now read-only.

go/makefile: add -race flag for social tests - #10233

Merged
cihangir merged 10 commits into
masterfrom
race-flag-tests
Jan 24, 2017
Merged

go/makefile: add -race flag for social tests#10233
cihangir merged 10 commits into
masterfrom
race-flag-tests

Conversation

@mehmetalisavas

@mehmetalisavas mehmetalisavas commented Jan 6, 2017

Copy link
Copy Markdown
Contributor

Add -race flag for tests

Note: ENV variables are used for testing step by step all tests files, i will make '-race' flag as default in bash script and will remove COMPILE_FLAGS variable

@mehmetalisavas

Copy link
Copy Markdown
Contributor Author

before review & merge this PR, we need to merge #10155

Comment thread go/src/socialapi/Makefile Outdated
@`which go` test -c workers/realtime/models/*.go
@./models.test $(DBG) $(EXTRAS) -c $(CONFIG)
@rm ./models.test
@env COMPILE_FLAGS="-race" $(KODINGDIR)/scripts/gotests.sh socialapi socialapi/workers/realtime/models

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

instead of adding race here, having it in gotests would be better, ignore me if you are just eliminating them one by one for now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i've added as a note for this '-race' usage in PR description. its just to test step by step for now

@codecov-io

codecov-io commented Jan 13, 2017

Copy link
Copy Markdown

Current coverage is 29.96% (diff: 100%)

Merging #10233 into master will increase coverage by 0.08%

@@             master     #10233   diff @@
==========================================
  Files            93         93          
  Lines         11068      11068          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           3308       3317     +9   
+ Misses         7417       7409     -8   
+ Partials        343        342     -1   

Powered by Codecov. Last update 6f61976...a5082e7

@mehmetalisavas mehmetalisavas left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

solved with capturing variables

for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
t.Parallel()
// t.Parallel()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

still needs to be fixed. parallelling does race condition

@cihangir
cihangir merged commit 8d75ccd into master Jan 24, 2017
@cihangir
cihangir deleted the race-flag-tests branch January 24, 2017 08:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants