Skip to content
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

run tests on ephemeral ports #2081

Merged
merged 2 commits into from
Feb 24, 2018
Merged

Conversation

MartinNowak
Copy link
Contributor

- for obvious reasons
- dropped IPv6 binds as requestHTTP to IPv6 addresses doesn't work (vibe-d#2080)
  (also IPv6 support should be tested once, not everywhere)
@wilzbach
Copy link
Member

for obvious reasons

Yeah, just a recent example:

https://ci.dlang.io/blue/organizations/jenkins/dlang-org%2Fdmd/detail/PR-7939/5/pipeline

dropped IPv6 binds as requestHTTP to IPv6 addresses doesn't work

Though there seems to be something wrong with vibe-core and the older libevent driver:

+cd tests/tcpproxy
...
Running ./tests 
Test protocol implementation on server
Test failed: Failed to connect to [0:0:0:0:0:0:0:0]:41441 (Cannot assign requested address)
Program exited with code 1

(all libasync jobs pass)

I tried to reproduce this locally, but failed.

@s-ludwig
Copy link
Member

The libasync runs pass only because the high level tests are not executed. The tcpproxy example is just missing an explicit "127.0.0.1" bind address (as well as some others maybe).

@MartinNowak
Copy link
Contributor Author

MartinNowak commented Feb 23, 2018

+cd tests/tcpproxy ... Running ./tests Test protocol implementation on server Test failed: Failed to connect to [0:0:0:0:0:0:0:0]:41441 (Cannot assign requested address) Program exited with code 1

It's weird that listenTCP returns an IPv6 listener with addr 0 on Travis-CI which doesn't have IPv6 enabled (filed as #2083). I've added a workaround and filtered the listeners for an IPv4 one.

@MartinNowak
Copy link
Contributor Author

Please rerun or ignore this job https://travis-ci.org/vibe-d/vibe.d/jobs/345425216.

@wilzbach
Copy link
Member

It's weird that listenTCP returns an IPv6 listener with addr 0 on Travis-CI which doesn't have IPv6 enabled (filed as #2083

Especially given that some tests like tests/vibe.core.net.1726 which also use listenTCP pass fine :O

Please rerun or ignore this job https://travis-ci.org/vibe-d/vibe.d/jobs/345425216.

@s-ludwig any chance @MartinNowak can be added to team?
(of course ideally we deploy dlang/installer#273 and dlang/installer#301 ...)

@s-ludwig s-ludwig merged commit 2f58e72 into vibe-d:master Feb 24, 2018
@s-ludwig
Copy link
Member

Sent an invitation

@MartinNowak MartinNowak deleted the ephemeral_ports branch February 24, 2018 22:24
@MartinNowak
Copy link
Contributor Author

Especially given that some tests like tests/vibe.core.net.1726 which also use listenTCP pass fine :O

That surprised me as well, the API is a bit weird, apparently it does listen on all interfaces and for IPv4 and IPv6 separately if you don't specify an address.
http://vibed.org/api/vibe.core.net/listenTCP
Other tests explicity select 127.0.0.1, so they don't run into the IPv6 bug.

@s-ludwig
Copy link
Member

Yeah, I'd really like to deprecate this and the ["::", "0.0.0.0"] default for HTTPServerSettings.bindAddresses. It's legacy code that doesn't make sense at all today.

@wilzbach
Copy link
Member

FYI I tagged v0.8.3-alpha.5, s.t. this can be used on the Project Tester.

Yeah, I'd really like to deprecate this and the ["::", "0.0.0.0"] default for HTTPServerSettings.bindAddresses. It's legacy code that doesn't make sense at all today.

Cool! Let's give this a try:

#2086
#2087

@dejlek
Copy link

dejlek commented May 2, 2018

I disagree. Binding to all available interfaces makes more sense than binding to the 127.0.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants