From 743584f6588aa69e59b11061a02504bef2c566f3 Mon Sep 17 00:00:00 2001 From: alexxiyang Date: Mon, 12 Nov 2018 19:26:44 -0800 Subject: [PATCH] Fix test case. Release 3.2.0 --- pom.xml | 4 ++-- src/test/java/org/crazycake/shiro/RedisCacheTest.java | 5 +++-- src/test/resources/shiro-standalone.ini | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index b93f9dab4..92869008e 100644 --- a/pom.xml +++ b/pom.xml @@ -85,7 +85,7 @@ - alexxiyang + alexxiyang Alex Yang alexxiyang@gmail.com GMT-7 @@ -172,7 +172,7 @@ - 4DD0EC63 + D688E942 alexxiyang diff --git a/src/test/java/org/crazycake/shiro/RedisCacheTest.java b/src/test/java/org/crazycake/shiro/RedisCacheTest.java index 26d9057cf..b092555da 100644 --- a/src/test/java/org/crazycake/shiro/RedisCacheTest.java +++ b/src/test/java/org/crazycake/shiro/RedisCacheTest.java @@ -89,16 +89,17 @@ public void testPutNull() { } @Test - public void testPutIdeal() { + public void testPut() { doPutAuth(redisCache, user1); FakeAuth fakeAuth = redisCache.get(user1); assertAuthEquals(fakeAuth, turnUserToFakeAuth((UserInfo)user1.getPrimaryPrincipal())); } @Test - public void testSize() { + public void testSize() throws InterruptedException { doPutAuth(redisCache, user1); doPutAuth(redisCache, user2); + Thread.sleep(200); assertEquals(redisCache.size(), 2); } diff --git a/src/test/resources/shiro-standalone.ini b/src/test/resources/shiro-standalone.ini index 0e31f2b57..e821a5b0a 100644 --- a/src/test/resources/shiro-standalone.ini +++ b/src/test/resources/shiro-standalone.ini @@ -1,4 +1,4 @@ redisManager.host = 127.0.0.1:6379 -redisSessionDAO.expire = 30 -cacheManager.expire = 30 +redisSessionDAO.expire = 3000 +cacheManager.expire = 3000 cacheManager.principalIdFieldName = userId \ No newline at end of file