notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r2647 - in development/main/transit/core/handler/src: main/net/dpml/transit/manager test/net/dpml/transit/manager
- From: mcconnell AT dpml.net
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r2647 - in development/main/transit/core/handler/src: main/net/dpml/transit/manager test/net/dpml/transit/manager
- Date: Sat, 21 May 2005 23:40:12 +0000
Author: mcconnell AT dpml.net
Date: Sat May 21 23:40:07 2005
New Revision: 2647
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/manager/ProxyManager.java
development/main/transit/core/handler/src/test/net/dpml/transit/manager/ProxyManagerTestCase.java
Log:
Update the testcase so we can see what is going on under unix.
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/manager/ProxyManager.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/manager/ProxyManager.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/manager/ProxyManager.java
Sat May 21 23:40:07 2005
@@ -264,9 +264,11 @@
* Resolve the list of host names to be assigned as non-proxied hosts. If
proxy
* excludes are defined the string returned contains the host name
(wilcards allowed)
* separated by the "|" character. If no proxy excludes are defined the
value returned
- * shall be null.
+ * shall be null. The implementation reads the set of attribute names
associated
+ * with a preferences node named "excludes". Each attribute name is
appended to
+ * a single string where names are separated by the "|" character.
*
- * @param prefs a node named 'proxy' containing a child node named
'excludes'
+ * @param prefs the 'proxy' prefs node containing a child node named
'excludes'
* @return a string containing a sequence of excluded hosts (possibly
null)
*/
private String resolveProxyExcludes( Preferences prefs )
Modified:
development/main/transit/core/handler/src/test/net/dpml/transit/manager/ProxyManagerTestCase.java
==============================================================================
---
development/main/transit/core/handler/src/test/net/dpml/transit/manager/ProxyManagerTestCase.java
(original)
+++
development/main/transit/core/handler/src/test/net/dpml/transit/manager/ProxyManagerTestCase.java
Sat May 21 23:40:07 2005
@@ -123,6 +123,7 @@
Preferences excludes = prefs.node( "excludes" );
excludes.put( "http://www.osm.net", "" );
excludes.put( "http://repository.dpml.net", "" );
+ excludes.flush();
try
{
prefs.put( "host", "http://proxy.dpml.net" );
@@ -130,16 +131,28 @@
prefs.put( "prompt", "a-prompt" );
prefs.putLong( "modified", new Date().getTime() );
prefs.flush();
- prefs.sync();
+
+ String expected =
"http://www.osm.net|http://repository.dpml.net";
+ String result = m_manager.getProxyModel().getProxyExcludes();
+
+ if( false == expected.equals( result ) )
+ {
+ // get some info about what is happening
+
+ System.out.println( "# BAD RESULT ON EXCLUDES" );
+ System.out.println( "# Expected: " + expected );
+ System.out.println( "# Actual: " + result );
+ System.out.println( "# Excludes node: ");
+ excludes.exportNode( System.out );
+ }
+
assertEquals(
- "excludes", "http://www.osm.net|http://repository.dpml.net",
- m_manager.getProxyModel().getProxyExcludes() );
+ "excludes", expected, result );
}
finally
{
- prefs.clear();
excludes.clear();
- excludes.removeNode();
+ prefs.clear();
prefs.flush();
}
}
- svn commit: r2647 - in development/main/transit/core/handler/src: main/net/dpml/transit/manager test/net/dpml/transit/manager, mcconnell, 05/21/2005
Archive powered by MHonArc 2.6.24.