{"action":"created","issue":{"url":"https://api.github.com/repos/adrianco/spigo/issues/7","labels_url":"https://api.github.com/repos/adrianco/spigo/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/adrianco/spigo/issues/7/comments","events_url":"https://api.github.com/repos/adrianco/spigo/issues/7/events","html_url":"https://github.com/adrianco/spigo/pull/7","id":69738567,"number":7,"title":"Fix race condition in eureka test case","user":{"login":"vaskoz","id":21339,"avatar_url":"https://avatars.githubusercontent.com/u/21339?v=3","gravatar_id":"","url":"https://api.github.com/users/vaskoz","html_url":"https://github.com/vaskoz","followers_url":"https://api.github.com/users/vaskoz/followers","following_url":"https://api.github.com/users/vaskoz/following{/other_user}","gists_url":"https://api.github.com/users/vaskoz/gists{/gist_id}","starred_url":"https://api.github.com/users/vaskoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaskoz/subscriptions","organizations_url":"https://api.github.com/users/vaskoz/orgs","repos_url":"https://api.github.com/users/vaskoz/repos","events_url":"https://api.github.com/users/vaskoz/events{/privacy}","received_events_url":"https://api.github.com/users/vaskoz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-21T04:13:08Z","updated_at":"2015-04-23T07:06:57Z","closed_at":"2015-04-23T07:06:54Z","pull_request":{"url":"https://api.github.com/repos/adrianco/spigo/pulls/7","html_url":"https://github.com/adrianco/spigo/pull/7","diff_url":"https://github.com/adrianco/spigo/pull/7.diff","patch_url":"https://github.com/adrianco/spigo/pull/7.patch"},"body":"Ran the race detector on your tests and found the race condition below. The globally accessible and mutable archaius package Conf variable is dangerous when accessed by multiple goroutines.\r\n`go test -race ./...`\r\n\r\n```\r\neureka_test start\r\n2015/04/20 22:09:32 test.edda: starting\r\n2015/04/20 22:09:32 test.eureka: starting\r\n==================\r\nWARNING: DATA RACE\r\nRead by goroutine 9:\r\n  github.com/adrianco/spigo/edda.Start()\r\n      /Users/vasko/gocode/src/github.com/adrianco/spigo/edda/edda.go:35 +0x314\r\n\r\nPrevious write by goroutine 8:\r\n  github.com/adrianco/spigo/eureka.TestDiscovery()\r\n      /Users/vasko/gocode/src/github.com/adrianco/spigo/eureka/eureka_test.go:21 +0x232\r\n  testing.tRunner()\r\n      /Users/vasko/code/go/src/testing/testing.go:452 +0xfc\r\n\r\nGoroutine 9 (running) created at:\r\n  github.com/adrianco/spigo/eureka.TestDiscovery()\r\n      /Users/vasko/gocode/src/github.com/adrianco/spigo/eureka/eureka_test.go:18 +0x1cd\r\n  testing.tRunner()\r\n      /Users/vasko/code/go/src/testing/testing.go:452 +0xfc\r\n\r\nGoroutine 8 (running) created at:\r\n  testing.RunTests()\r\n      /Users/vasko/code/go/src/testing/testing.go:560 +0xc9b\r\n  testing.(*M).Run()\r\n      /Users/vasko/code/go/src/testing/testing.go:490 +0xe7\r\n  main.main()\r\n      github.com/adrianco/spigo/eureka/_test/_testmain.go:54 +0x28c\r\n==================\r\n==================\r\nWARNING: DATA RACE\r\nRead by goroutine 9:\r\n  github.com/adrianco/spigo/edda.Start()\r\n      /Users/vasko/gocode/src/github.com/adrianco/spigo/edda/edda.go:38 +0x34d\r\n\r\nPrevious write by goroutine 8:\r\n2015/04/20 22:09:32 test.eureka(backlog 4): gotocol: 531.226µs Hello test0 test\r\n  github.com/adrianco/spigo/eureka.TestDiscovery()\r\n      /Users/vasko/gocode/src/github.com/adrianco/spigo/eureka/eureka_test.go:20 +0x204\r\n  testing.tRunner()\r\n      /Users/vasko/code/go/src/testing/testing.go:452 +0xfc\r\n\r\nGoroutine 9 (running) created at:\r\n  github.com/adrianco/spigo/eureka.TestDiscovery()\r\n      /Users/vasko/gocode/src/github.com/adrianco/spigo/eureka/eureka_test.go:18 +0x1cd\r\n  testing.tRunner()\r\n      /Users/vasko/code/go/src/testing/testing.go:452 +0xfc\r\n\r\nGoroutine 8 (running) created at:\r\n  testing.RunTests()\r\n      /Users/vasko/code/go/src/testing/testing.go:560 +0xc9b\r\n  testing.(*M).Run()\r\n      /Users/vasko/code/go/src/testing/testing.go:490 +0xe7\r\n  main.main()\r\n      github.com/adrianco/spigo/eureka/_test/_testmain.go:54 +0x28c\r\n==================\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/adrianco/spigo/issues/comments/95468634","html_url":"https://github.com/adrianco/spigo/pull/7#issuecomment-95468634","issue_url":"https://api.github.com/repos/adrianco/spigo/issues/7","id":95468634,"user":{"login":"adrianco","id":111700,"avatar_url":"https://avatars.githubusercontent.com/u/111700?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianco","html_url":"https://github.com/adrianco","followers_url":"https://api.github.com/users/adrianco/followers","following_url":"https://api.github.com/users/adrianco/following{/other_user}","gists_url":"https://api.github.com/users/adrianco/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianco/subscriptions","organizations_url":"https://api.github.com/users/adrianco/orgs","repos_url":"https://api.github.com/users/adrianco/repos","events_url":"https://api.github.com/users/adrianco/events{/privacy}","received_events_url":"https://api.github.com/users/adrianco/received_events","type":"User","site_admin":false},"created_at":"2015-04-23T07:06:57Z","updated_at":"2015-04-23T07:06:57Z","body":"Thanks for the fix!"}}