Do we have any code in our RSS macro that handles exception?
If so all we need to have if a unit test with mocks that prove that
when there's an error in the RSS access layer (rome?) then we handle
it correctly.
Thanks
-Vincent
On Jun 8, 2009, at 12:14 PM, asiri (SVN) wrote:
Author: asiri
Date: 2009-06-08 12:14:00 +0200 (Mon, 08 Jun 2009)
New Revision: 20958
Modified:
platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-
rendering-macro-rss/src/test/java/org/xwiki/rendering/
RssMacroFailureConditionsTest.java
Log:
[misc] Removed the "connection timeout exception" test. This test is
non-deterministic.
Modified: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/
xwiki-rendering-macro-rss/src/test/java/org/xwiki/rendering/
RssMacroFailureConditionsTest.java
===================================================================
--- platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-
rendering-macro-rss/src/test/java/org/xwiki/rendering/
RssMacroFailureConditionsTest.java 2009-06-08 08:43:44 UTC (rev 20957)
+++ platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-
rendering-macro-rss/src/test/java/org/xwiki/rendering/
RssMacroFailureConditionsTest.java 2009-06-08 10:14:00 UTC (rev 20958)
@@ -44,27 +44,7 @@
} catch (MacroExecutionException expected) {
assertTrue("The required 'feed' parameter is
missing".equals(expected.getMessage()));
}
- }
-
- /**
- * Tests the macro's behavior when the server hosting the feeds
doesn't respond.
- */
- public void testConnectionTimeout() throws
MacroParameterException
- {
- assertNotNull(macro);
- assertNotNull(parameters);
-
- // We set the feed's URL to an unreachable address.
- parameters.setFeed("http://22.22.22.22");
-
- try {
- macro.execute(parameters, null, null);
- fail("The macro should throw a 'Connection timeout
exception'");
- } catch (MacroExecutionException expected) {
- String errorMessage = expected.getMessage();
- assertTrue(errorMessage.startsWith("Connection timeout
when trying to reach"));
- }
- }
+ }
/**
* Tests the macro's behavior when the server hosting the feeds
doesn't respond.