commit | 6641f7f494efc6344d47e3f50e188798734a01f8 | [log] [tgz] |
---|---|---|
author | Clement Escoffier <clement@apache.org> | Mon Jul 12 17:48:30 2010 +0000 |
committer | Clement Escoffier <clement@apache.org> | Mon Jul 12 17:48:30 2010 +0000 |
tree | 807e4f1a2bcd675f8783c4fe9b943fe59557a9b1 | |
parent | c29a6db7a1f6a6730d8c029b8955a2afb1b6005e [diff] |
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;