fix blocking tests (#3378)

* make sure modules using java8

* move url matching code

* upgrade boot parent

* minor cleanup

* fix blocking tests
This commit is contained in:
Doha2012
2018-01-08 23:39:01 +02:00
committed by Grzegorz Piwowarek
parent cbd1a9dfbf
commit ee86e6b6ad
6 changed files with 85 additions and 60 deletions

View File

@@ -89,7 +89,7 @@ public class GuavaCacheUnitTest {
cache.getUnchecked("hello");
assertEquals(1, cache.size());
cache.getUnchecked("hello");
Thread.sleep(300);
Thread.sleep(3);
cache.getUnchecked("test");
assertEquals(1, cache.size());
assertNull(cache.getIfPresent("hello"));
@@ -106,7 +106,7 @@ public class GuavaCacheUnitTest {
final LoadingCache<String, String> cache = CacheBuilder.newBuilder().expireAfterWrite(2, TimeUnit.MILLISECONDS).build(loader);
cache.getUnchecked("hello");
assertEquals(1, cache.size());
Thread.sleep(300);
Thread.sleep(3);
cache.getUnchecked("test");
assertEquals(1, cache.size());
assertNull(cache.getIfPresent("hello"));
@@ -203,8 +203,9 @@ public class GuavaCacheUnitTest {
private String getSuffix(final String str) {
final int lastIndex = str.lastIndexOf('.');
if (lastIndex == -1)
if (lastIndex == -1) {
return null;
}
return str.substring(lastIndex + 1);
}