History log of /libcore/luni/src/test/java/libcore/java/net/ConcurrentCloseTest.java
Revision Date Author Comments
d982f3183750046eef2d6be6548d507018944221 14-Mar-2017 Kazuhiro Inaba <kinaba@google.com> DO NOT MERGE: Revert "Remove StuckServer using backlog and tests relying on it"

This reverts commit 8ffb0f557712e57c7dbf795b2cff79ee61c51c59.
(DO NOT MERGE because the original CL was a cherry-pick form N,
where this wasn't a problem. It breaks trees only on M.)

Bug: 35934294
(cherry picked from commit d7f172d08f54daed09c1906f24eff3e68cd50c05)

Change-Id: Id0b18389de73110f3f07f591f4272dbb50b4417b
5dcc3ce8cae450f7800570b2826f5232096159cd 20-Jan-2017 Yi Kong <yikong@google.com> DO NOT MERGE: Remove StuckServer using backlog and tests relying on it

This cherry-pick contains additional changes to remove more references
to StuckServer. The URLConnectionTest#teestConnectTimeouts() test is
suppressed in M via libcore/expectations/brokentests.txt and is not
expected to work. This change should not be merged into N branches.
(Original commit description follows below.)

StuckServer uses kernel implementation details that have changed on
version > 4.4, and causing tests depending on it to fail. Since we can't
find an alternative method to simulate a stuck server without special
permission, and the test itself is not reliable in that they don't fail
on non-stuck servers, remove them from Libcore tests.

Test: CtsLibcoreTestCases
Test: rm -rf out; m -j30 cts
Bug: 32551747
Bug: 35934294
(cherry picked from commit b5c7cd37726154f8da123e1844b5d60a63a60a2c)

Change-Id: I4dd951e9527b5ee5701c0c3ad3eaa0c6f34e8ef7
d7f172d08f54daed09c1906f24eff3e68cd50c05 14-Mar-2017 Kazuhiro Inaba <kinaba@google.com> DO NOT MERGE: Revert "Remove StuckServer using backlog and tests relying on it"

This reverts commit 8ffb0f557712e57c7dbf795b2cff79ee61c51c59.
(DO NOT MERGE because the original CL was a cherry-pick form N,
where this wasn't a problem. It breaks trees only on M.)

It didn't block 'm cts' but it broke other targets.
libcore/luni/src/test/java/libcore/java/net/URLConnectionTest.java
still had a reference to StuckServer.


Change-Id: If9486b5b552c4992536507da5460436fb8185df3
71fdb62763544446c146c7659e393434fa4ae10c 09-Mar-2017 Yi Kong <yikong@google.com> Correct references to Blackhole address RFC docs

IPv4 Blackhole 192.0.2.0/24(TEST-NET-1) is specified in RFC 5737 instead
of RFC 6666.

Bug: 34832066
Test: N/A
Change-Id: Iac0e1fc3afb65e243a1f33e8204fb1a132d6ff68
8ffb0f557712e57c7dbf795b2cff79ee61c51c59 20-Jan-2017 Yi Kong <yikong@google.com> Remove StuckServer using backlog and tests relying on it

StuckServer uses kernel implementation details that have changed on
version > 4.4, and causing tests depending on it to fail. Since we can't
find an alternative method to simulate a stuck server without special
permission, and the test itself is not reliable in that they don't fail
on non-stuck servers, remove them from Libcore tests.

(cherry picked from commit 6a5e142b16cf6b921420d371c35d950a13b22db1)

Test: CtsLibcoreTestCases
Bug: 32551747
Change-Id: I88d837329d65040a9f8550fff790f8703ea773f3
(cherry picked from commit b5c7cd37726154f8da123e1844b5d60a63a60a2c)
d66289f0830f9aaba627fdab5bd5ad732c38022f 06-Feb-2017 Yi Kong <yikong@google.com> Clean up ConcurrentCloseTest#Killer

Instead of using reflection to call close() method, use generics to
specify the class implements Closeable, so that we can call close()
directly.

Test: libcore.java.net.ConcurrentCloseTest
Change-Id: I05bc4e74903fe5e4f2bda67adc6510acc3194971
b5c7cd37726154f8da123e1844b5d60a63a60a2c 20-Jan-2017 Yi Kong <yikong@google.com> Remove StuckServer using backlog and tests relying on it

StuckServer uses kernel implementation details that have changed on
version > 4.4, and causing tests depending on it to fail. Since we can't
find an alternative method to simulate a stuck server without special
permission, and the test itself is not reliable in that they don't fail
on non-stuck servers, remove them from Libcore tests.

(cherry picked from commit 6a5e142b16cf6b921420d371c35d950a13b22db1)

Test: CtsLibcoreTestCases
Bug: 32551747
Change-Id: I88d837329d65040a9f8550fff790f8703ea773f3
6a5e142b16cf6b921420d371c35d950a13b22db1 20-Dec-2016 Yi Kong <yikong@google.com> Remove StuckServer using backlog and tests relying on it

StuckServer uses kernel implementation details that have changed on
version > 4.4, and causing tests depending on it to fail. Since we can't
find an alternative method to simulate a stuck server without special
permission, and the test itself is not reliable in that they don't fail
on non-stuck servers, remove them from Libcore tests.

Test: CtsLibcoreTestCases
Bug: 32551747
Change-Id: I88d837329d65040a9f8550fff790f8703ea773f3
72c9e00f7b2c4bd5574341f101ce72a372ffe40f 19-Jan-2016 Narayan Kamath <narayan@google.com> Fix ConcurrentCloseTest#test_write.

NOTE: This was a bullhead specific failure.

Change-Id: Ic22e39aa4be17adc1959126b0fc6bfbf6176251f
271e9ada533970e09897bbde8858e991a07ba245 19-Mar-2013 Elliott Hughes <enh@google.com> Fix ConcurrentCloseTest's write test to ensure we're really blocked in write(2).

Bug: 8272932
Change-Id: Id0b9b23176bf179af85bcaf321df5bab05b093be
0e1afa1091f74a6228c01d8c7a8eebf001efdc57 13-Oct-2012 Elliott Hughes <enh@google.com> Fix ConcurrentCloseTest flakiness.

We can't rely on consuming all the listen(2) backlog. For the tests we've
seen fail because they sometimes connect rather than time out, switch to
an unroutable address.

(cherry-pick of babccbf9e429c4c78aca24c205825ceaaf7d3f37.)

Bug: 6971145
Change-Id: Ibfa412ff1ad7da7e63842d0162cc67a706e2b27e
babccbf9e429c4c78aca24c205825ceaaf7d3f37 13-Oct-2012 Elliott Hughes <enh@google.com> Fix ConcurrentCloseTest flakiness.

We can't rely on consuming all the listen(2) backlog. For the tests we've
seen fail because they sometimes connect rather than time out, switch to
an unroutable address.

Bug: 6971145
Change-Id: I259d31b1a15123bcd78c36849d5ed863d392ac20
78601286edbfed7ea072814763f661eb80f6e777 10-Oct-2012 Elliott Hughes <enh@google.com> Extra log output for ConcurrentCloseTest flakiness.

No clue what's wrong here, but we're seeing some flakiness in the
"connect" tests. Hopefully there will be a clue in this extra
output next time we see a failure.

(cherry-pick of 735875881f3995ec6a687e65a2e5495304bc48be.)

Bug: 6971145
Change-Id: I8236b2fb368581e2b6965898f109370e7e0af2e5
735875881f3995ec6a687e65a2e5495304bc48be 10-Oct-2012 Elliott Hughes <enh@google.com> Extra log output for ConcurrentCloseTest flakiness.

No clue what's wrong here, but we're seeing some flakiness in the
"connect" tests. Hopefully there will be a clue in this extra
output next time we see a failure.

Bug: 6971145
Change-Id: Ifed716cba5a17cab84e9535ec054785ee7d09aa7
3d43199950729e592ac3e104442b4b350a86aec8 26-Sep-2012 Elliott Hughes <enh@google.com> Fix ConcurrentCloseTest flakiness.

We were running the risk that the server's end of a client socket would get
closed by the finalizer thread, resulting in read(2) returning 0 to the client,
and the test failing like this:

junit.framework.AssertionFailedError: read returned -1
at libcore.java.net.ConcurrentCloseTest.test_read(ConcurrentCloseTest.java:121)
at java.lang.reflect.Method.invokeNative(Native Method)

(cherry-pick of 4bbcd7e5aee1e984a4fcf46385667f9ad03dbc16.)

Bug: 7206024
Change-Id: I0dae214a7ee609655f4f4781abf4457863bcfd5f
4bbcd7e5aee1e984a4fcf46385667f9ad03dbc16 26-Sep-2012 Elliott Hughes <enh@google.com> Fix ConcurrentCloseTest flakiness.

We were running the risk that the server's end of a client socket would get
closed by the finalizer thread, resulting in read(2) returning 0 to the client,
and the test failing like this:

junit.framework.AssertionFailedError: read returned -1
at libcore.java.net.ConcurrentCloseTest.test_read(ConcurrentCloseTest.java:121)
at java.lang.reflect.Method.invokeNative(Native Method)

Bug: 7206024
Change-Id: I3f228dc4d3bfb59f6595ebe255de2cf4047d06b8
796f0d5a4e7b83c3efc5e587b6766977dc20b0c3 16-Feb-2012 Elliott Hughes <enh@google.com> Fix asynchronous interruption of Socket.connect with a timeout.

Turns out there was one connect variant I hadn't properly addressed.

Bug: http://code.google.com/p/android/issues/detail?id=24318
Change-Id: I7af697bdf6ea17ad1f8ea904d7d8a051ffb970d2
5fc5dde4c719c1dfdac46b67d5d2e4884d07721e 16-Nov-2010 Elliott Hughes <enh@google.com> Improve ConcurrentCloseTest.

No more flaky use of 10.* addresses.

Bug: 3044772
Change-Id: I5ca8dc431b50950efdc818efe73eb9aba76ea67f
3c6ca77845ce5f0e80c4dc49617601918023c1ed 27-Sep-2010 Elliott Hughes <enh@google.com> Don't wrap select(2) in TEMP_FAILURE_RETRY.

Luckily, since the caller has to cope with us saying "we're not connected yet,
try again", we can just go that route.

I've also added another plausible possible exception to one of the tests, seen
once when testing on a host dalvikvm.

Bug: 3022824
Change-Id: Ia155f86f9f7b9b0a54e58c55f668faaebcbda55e
4557728efb66c455a52b7669a8eefef7a9e54854 11-Aug-2010 Jesse Wilson <jessewilson@google.com> Moving tests to be under the libcore.* package.

This is indended to make it easier to run on VMs that restrict the packages
from which application classes can be loaded. For example, on the RI you need
to use the bootclasspath to load these tests.

Change-Id: I52193f35c5fcca18b5a3e1d280505b1e29b388af