Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(107)

Issue 5909062: testing: let the OS choose a port to listen on.

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 1 month ago by rog
Modified:
12 years, 1 month ago
Reviewers:
mp+99314
Visibility:
Public.

Description

testing: let the OS choose a port to listen on. This stops random clashes between tests running concurrently or when the server hasn't finished soon enough after it's destroyed. Also make testing panic on error rather than use Fatalfer. https://code.launchpad.net/~rogpeppe/juju/go-zk-testing-random-port/+merge/99314 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : testing: use a random port to start zookeeper server. #

Total comments: 3

Patch Set 3 : testing: let the OS choose a port to listen on. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -38 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M state/internal_test.go View 3 chunks +3 lines, -3 lines 0 comments Download
M state/state_test.go View 3 chunks +3 lines, -3 lines 0 comments Download
M testing/log.go View 1 chunk +1 line, -0 lines 0 comments Download
M testing/zk.go View 1 2 3 chunks +22 lines, -13 lines 0 comments Download
M testing/zk_test.go View 2 chunks +8 lines, -19 lines 0 comments Download

Messages

Total messages: 5
rog
Please take a look.
12 years, 1 month ago (2012-03-26 12:51:37 UTC) #1
niemeyer
If the port selection is simplified in one of the two ways suggested, LGTM. https://codereview.appspot.com/5909062/diff/8/testing/zk.go ...
12 years, 1 month ago (2012-03-26 19:59:05 UTC) #2
rog
https://codereview.appspot.com/5909062/diff/8/testing/zk.go File testing/zk.go (right): https://codereview.appspot.com/5909062/diff/8/testing/zk.go#newcode31 testing/zk.go:31: p := <-randomPorts On 2012/03/26 19:59:05, niemeyer wrote: > ...
12 years, 1 month ago (2012-03-26 20:23:08 UTC) #3
niemeyer
https://codereview.appspot.com/5909062/diff/8/testing/zk.go File testing/zk.go (right): https://codereview.appspot.com/5909062/diff/8/testing/zk.go#newcode31 testing/zk.go:31: p := <-randomPorts On 2012/03/26 20:23:08, rog wrote: > ...
12 years, 1 month ago (2012-03-26 21:19:18 UTC) #4
rog
12 years, 1 month ago (2012-03-27 14:06:44 UTC) #5
*** Submitted:

testing: let the OS choose a port to listen on.

This stops random clashes between tests running concurrently
or when the server hasn't finished soon enough after it's destroyed.

Also make testing panic on error rather than use Fatalfer.

R=niemeyer
CC=
https://codereview.appspot.com/5909062
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b