Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #412 from lowzj/fix-test-data-race
Browse files Browse the repository at this point in the history
test: fix data race caused by TestLaunchPeerServer
  • Loading branch information
chenchaobing authored Feb 22, 2019
2 parents 2cbc9dd + 42aabd7 commit 6731ad1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dfget/core/uploader/uploader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ func (s *UploaderLaunchTestSuite) TestLaunchPeerServer(c *check.C) {
{port, 0, "start peer server error"},
}

cfg := createConfig(s.workHome, 0)
for _, v := range cases {
cfg := createConfig(s.workHome, v.port)
cfg.RV.PeerPort = v.port
port, err := LaunchPeerServer(cfg)

c.Assert(port, check.Equals, v.expectedPort)
Expand Down

0 comments on commit 6731ad1

Please sign in to comment.