From b471510fb37f86216cccc1341a705111ad3ef9d2 Mon Sep 17 00:00:00 2001 From: Matthieu Baechler Date: Fri, 11 Dec 2015 09:10:59 +0100 Subject: [PATCH] JAMES-1647 StopWatch.elapsedMillis doesn't exist anymore in recent guava releases --- .../org/apache/james/karaf/features/KarafLiveTestSupport.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/karaf/integration/src/test/java/org/apache/james/karaf/features/KarafLiveTestSupport.java b/server/karaf/integration/src/test/java/org/apache/james/karaf/features/KarafLiveTestSupport.java index 708c905225b..c9f47152679 100644 --- a/server/karaf/integration/src/test/java/org/apache/james/karaf/features/KarafLiveTestSupport.java +++ b/server/karaf/integration/src/test/java/org/apache/james/karaf/features/KarafLiveTestSupport.java @@ -127,7 +127,7 @@ void assertOSGiServiceStartsIn(Class clazz, int timeoutInMilliseconds) throws In Object[] services = tracker.getServices(); if (services == null || services.length < expectedCount) { final int actualCount = (services == null) ? 0 : services.length; - if (stopwatch.elapsedMillis() > timeoutInMilliseconds) { + if (stopwatch.elapsed(TimeUnit.MILLISECONDS) > timeoutInMilliseconds) { fail(String.format("Expected to find %d services of type %s. Found only %d in %d milliseconds", expectedCount, clazz.getCanonicalName(), actualCount, timeoutInMilliseconds)); }