diff options
author | zhulin0910 <zhulin0910@gmail.com> | 2015-09-24 14:21:45 +0800 |
---|---|---|
committer | Unsuk Jung <unsuk@google.com> | 2015-10-30 23:58:01 +0000 |
commit | 36363b0d43f12432837ab936b85973f08e74a299 (patch) | |
tree | 0c994f8e5403e8dc7777debf97d130a151d01036 /luni/src | |
parent | b75ac5656e423b03e009f809d81dd04de2de6664 (diff) | |
download | libcore-36363b0d43f12432837ab936b85973f08e74a299.zip libcore-36363b0d43f12432837ab936b85973f08e74a299.tar.gz libcore-36363b0d43f12432837ab936b85973f08e74a299.tar.bz2 |
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
Diffstat (limited to 'luni/src')
-rw-r--r-- | luni/src/test/java/libcore/javax/net/ssl/SSLSessionTest.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/luni/src/test/java/libcore/javax/net/ssl/SSLSessionTest.java b/luni/src/test/java/libcore/javax/net/ssl/SSLSessionTest.java index a434d94..bc2b626 100644 --- a/luni/src/test/java/libcore/javax/net/ssl/SSLSessionTest.java +++ b/luni/src/test/java/libcore/javax/net/ssl/SSLSessionTest.java @@ -99,7 +99,7 @@ public class SSLSessionTest extends TestCase { assertTrue("s.server.getLastAccessedTime()=" + s.server.getLastAccessedTime() + " " + "s.client.getLastAccessedTime()=" + s.client.getLastAccessedTime(), Math.abs(s.server.getLastAccessedTime() - - s.client.getLastAccessedTime()) < 1 * 1000); + - s.client.getLastAccessedTime()) <= 1 * 1000); assertTrue(s.server.getLastAccessedTime() >= s.server.getCreationTime()); assertTrue(s.client.getLastAccessedTime() >= |