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

HttpTest.test_weibo_post is flaky #1283

Closed
flakycov opened this Issue Jul 6, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@flakycov

flakycov commented Jul 6, 2017

HttpTest.test_weibo_post failed for us on commit 1dc3763 but did not fail on the corresponding run on Travis:

Our tool confirms this test to be flaky. The full stack trace is below. We set up our build environment to be as close as possible to your Travis build environment, using Ubuntu 12.04.5 LTS, Java 1.8.0_31 and Maven 3.3.9.

Tests run: 6, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 35.544 sec <<< FAILURE!
test_weibo_post(org.nutz.http.HttpTest)  Time elapsed: 30.269 sec  <<< ERROR!
org.nutz.http.HttpException: url=http://weibo.com/kuyunhudong
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:589)
	at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
	at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
	at sun.net.www.http.HttpClient.New(HttpClient.java:308)
	at sun.net.www.http.HttpClient.New(HttpClient.java:326)
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1168)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1104)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:998)
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:932)
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1282)
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1257)
	at org.nutz.http.Sender.getOutputStream(Sender.java:293)
	at org.nutz.http.sender.PostSender.send(PostSender.java:35)
	at org.nutz.http.Http.post2(Http.java:199)
	at org.nutz.http.HttpTest.test_weibo_post(HttpTest.java:140)
@wendal

This comment has been minimized.

Show comment
Hide comment
@wendal

wendal Jul 7, 2017

Member

network environment in china is very complex ... maybe this website is not accessable in your location ...

Member

wendal commented Jul 7, 2017

network environment in china is very complex ... maybe this website is not accessable in your location ...

@wendal wendal closed this in 067cec1 Jul 7, 2017

@flakycov

This comment has been minimized.

Show comment
Hide comment
@flakycov

flakycov Jul 24, 2017

@wendal Thanks for your response!

Do you run your Travis builds from some special location that is separate from what other developers around the world use? Maybe you can deal with network-related issues like this one by introducing mocks for the network connections?

flakycov commented Jul 24, 2017

@wendal Thanks for your response!

Do you run your Travis builds from some special location that is separate from what other developers around the world use? Maybe you can deal with network-related issues like this one by introducing mocks for the network connections?

@Wizzercn

This comment has been minimized.

Show comment
Hide comment
@Wizzercn

Wizzercn Jul 25, 2017

Member

@flakycov Where are you from?

Member

Wizzercn commented Jul 25, 2017

@flakycov Where are you from?

@flakycov

This comment has been minimized.

Show comment
Hide comment
@flakycov

flakycov Jul 25, 2017

@Wizzercn We were running our build in the US in an Amazon EC2 data center.

flakycov commented Jul 25, 2017

@Wizzercn We were running our build in the US in an Amazon EC2 data center.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment