d4b7449574ca69c713a3f2230cb77c68ee642700 |
|
06-Sep-2016 |
Tobias Thierer <tobiast@google.com> |
Fix 58 libcore tests that caught "expected" Exceptions but didn't fail() There were no changes to code under test. 4 tests were fixed to not tolerate an Exception: - libcore.java.util.CollectionsTest#test_CheckedMap_computeIfAbsent In the case where a Map key is present, computeIfAbsent() should not invoke the Function, so there is no return value that could be expected to undergo a type check. The test was changed to verify that the Function is not invoked. - libcore.java.util.concurrent.CopyOnWriteArrayListTest#test_sort and libcore.java.util.concurrent.CopyOnWriteArrayListTest#test_subList_sort were sorting an already-sorted non-null list that contains no null values. That logic was redundant and wouldn't have thrown. - org.apache.harmony.security.tests.java.security.KeyStoreSpiTest#test_engineEntryInstanceOf (the KeyStoreSpi documentation does not mention whether NPE is thrown; the implementation comes from upstream and does not throw it). 54 tests were fixed by adding the missing fail(); No attempt was made to make this failure message specific to the exception that was expected. Tests that weren't changed: - SSLEngineTest.test_wrap_ByteBuffer_ByteBuffer_04() requires investigation to determine the correct resolution. A comment was added to the test linking to the corresponding bug. - ThreadTest#testParkUntilWithUnderflowValue() and OldNodeChangeEventTest.waitForEvent() were not touched since it was not clear whether that it was relevent to the test whether or not the exception was thrown. - two cases in Files2Test#test_setPosixFilePermissions_NPE() are left to a future CL Test: (croot; make vogar core-tests) \ && git diff aosp/master --name-only | xargs vogar `cparg core-tests` Change-Id: I1cd3220a06e331ff049b146b393f78879f07211a
|
36363b0d43f12432837ab936b85973f08e74a299 |
|
24-Sep-2015 |
zhulin0910 <zhulin0910@gmail.com> |
Fix time calculation in test_SSLSession_getLastAccessedTime [root cause] Time precision in NativeCrypto SSL_SESSION_get_time is second, ignore millisecond. Then, assertTrue( Math.abs(s.server.getLastAccessedTime() - s.client.getLastAccessedTime()) < 1 * 1000); is not rigorous. [changes] modify diff time of s.server.getLastAccessedTime() and s.client.getLastAccessedTime() <= 1*1000 Bug: https://code.google.com/p/android/issues/detail?id=183898 (cherry picked from commit 3f49882b1d3316e37d8312d707c29261d14ece65) Change-Id: Ib0d5eb512f717f1fd88818eac5bf8ef0e5cbac6b
|
3f49882b1d3316e37d8312d707c29261d14ece65 |
|
24-Sep-2015 |
zhulin0910 <zhulin0910@gmail.com> |
Fix time calculation in test_SSLSession_getLastAccessedTime [root cause] Time precision in NativeCrypto SSL_SESSION_get_time is second, ignore millisecond. Then, assertTrue( Math.abs(s.server.getLastAccessedTime() - s.client.getLastAccessedTime()) < 1 * 1000); is not rigorous. [changes] modify diff time of s.server.getLastAccessedTime() and s.client.getLastAccessedTime() <= 1*1000 Bug: https://code.google.com/p/android/issues/detail?id=183898
|
2cd541f61919798b5b050c210f61db450ad8b013 |
|
30-Oct-2013 |
Alex Klyubin <klyubin@google.com> |
Refactor TLS/SSL cipher suite and protocol assertions. This hides expected lists of cipher suites and protocols from the users of assertion methods to: * enable targetSdkVersion-dependent behavior, and * centralize the definition of expected behavior in StandardNames. Bug: 11220570 Change-Id: I8b43196b24f02e10010223aa6738a9ce0df24333
|
32bf67c30721864879186f03dd5c84e3a6ac5a2b |
|
31-Aug-2013 |
Brian Carlstrom <bdc@google.com> |
Add getLastAccessedTime logging for flakey test_SSLSocket_TestSSLSessions_create test case Bug: 10577514 Change-Id: I867fc6f852a47fb299e82fff2870c136cc58cbdb
|
139f2954d4553d70ab21578cc5378b5a16c3cb72 |
|
31-Aug-2013 |
Brian Carlstrom <bdc@google.com> |
Add getLastAccessedTime logging for flakey test_SSLSocket_TestSSLSessions_create test case Bug: 10577514 Change-Id: I867fc6f852a47fb299e82fff2870c136cc58cbdb
|
8399ee3eb85894946668475af43259597a1d0f36 |
|
17-Jul-2012 |
Elliott Hughes <enh@google.com> |
Remove flakiness from libcore.javax.net.ssl.SSLSessionTest#test_SSLSession_getCreationTime. Bug: 6313283 Change-Id: I32399ce1e3d540d1248b90ad6eaaf0b196d0e7a5
|
f7aab022dcbfcd8f27b409ab92b4bca4a84d0b8a |
|
30-Sep-2010 |
Brian Carlstrom <bdc@google.com> |
CloseGuard: finalizers for closeable objects should log complaints Introducing CloseGuard which warns when resources are implictly cleaned up by finalizers when an explicit termination method, to use the Effective Java "Issue 7: Avoid finalizers" terminology, should have been used by the caller. libcore classes that can use CloseGuard now do so. Bug: 3041575 Change-Id: I4a4e3554addaf3075c823feb0a0ff0ad1c1f6196
|
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
|