-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nsqd: update dependencies #1387
Conversation
I tried putting the lowest supported go version in
(declaring "go 1.16" seems to work fine with previous versions anyway, and "go 1.17" also worked fine I guess ...) |
@@ -35,6 +35,8 @@ func testIOLoopReturnsClientErr(t *testing.T, fakeConn test.FakeNetConn) { | |||
opts := NewOptions() | |||
opts.Logger = test.NewTestLogger(t) | |||
opts.LogLevel = LOG_DEBUG | |||
opts.TCPAddress = "127.0.0.1:14163" // avoid possible conflict with other tests | |||
opts.HTTPAddress = "127.0.0.1:14164" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this change necessary? does it not handle the :0
"random free port"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this started happening persistently, though just for the go-1.17 test run:
--- FAIL: TestIOLoopReturnsClientErrWhenSendSucceeds (0.00s)
logger.go:16: INFO: nsqlookupd v1.2.1 (built w/go1.17.2)
assertions.go:31: lookup_protocol_v1_test.go:40:
<nil> (expected)
!= &errors.errorString{s:"listen (0.0.0.0:4161) failed - listen tcp 0.0.0.0:4161: bind: address already in use"} (actual)
The default ports of 4160/4161 were being used.
does it not handle the :0 "random free port"?
Somehow I had forgotten about that old common unix feature ... will update to do that
e4ecc35
to
5ad79d1
Compare
Updated, squashed a bit. The race detector caught another unrelated thing (under go-1.14) but a re-test alleviated the problem for now
|
@@ -35,6 +35,8 @@ func testIOLoopReturnsClientErr(t *testing.T, fakeConn test.FakeNetConn) { | |||
opts := NewOptions() | |||
opts.Logger = test.NewTestLogger(t) | |||
opts.LogLevel = LOG_DEBUG | |||
opts.TCPAddress = "127.0.0.1:0" | |||
opts.HTTPAddress = "127.0.0.1:0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess there are a few tests that don't use mustStartLookupd
, which does this automatically as a bootstrap step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, I see. there's also bootstrapNSQCluster()
which also does :0
for listening addresses
Not sure what to make of the race detector error given that it's internal to Go source code? |
I think you're supposed to ensure all |
ready? |
go-nsq v1.1.0 go-diskqueue v1.1.0 golang/snappy v0.0.4 BurntSushi/toml v0.4.1
NSQLookupd.New() listens on TCPAddress and HTTPAddress, which NewOptions() gives default values of 4160 and 4161, and sometimes this conflicts with other tests running concurrently.
d73ae48
to
e6b949d
Compare
squashed once more, ready to go |
No description provided.