Adapt the temporal dependency handler test suite to fit the change made for FELIX-2472 [iPOJO] Proxies should throw the OSGi service exception.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@963403 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/tests/handler/temporal/src/main/java/org/apache/felix/ipojo/test/scenarios/component/proxy/CheckServiceProviderHelper.java b/ipojo/tests/handler/temporal/src/main/java/org/apache/felix/ipojo/test/scenarios/component/proxy/CheckServiceProviderHelper.java
index cfa5b70..0f1e8d3 100755
--- a/ipojo/tests/handler/temporal/src/main/java/org/apache/felix/ipojo/test/scenarios/component/proxy/CheckServiceProviderHelper.java
+++ b/ipojo/tests/handler/temporal/src/main/java/org/apache/felix/ipojo/test/scenarios/component/proxy/CheckServiceProviderHelper.java
@@ -38,10 +38,17 @@
         if (fs != null) { // Cannot be null

             try {

                 return fs.foo();

-            } catch (NullPointerException e) {

-                // Can throw a NPE for null policy.

-                System.out.println(e.getMessage());

-                return false;

+            } catch (RuntimeException e) { // Now it's a runtime exception (FELIX-2472)

+                // Can throw a RTE for null policy and for time out

+                if (e.getMessage().equals("No service available")) {

+                    // Has detected a null policy.

+                    System.out.println(e.getMessage());

+                    return false;

+                } else {

+                    // Timeout

+                    // Propagate the exception

+                    throw e;

+                }

             }

         }

         return false;