servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r563819 - in /incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-file/src/test: java/org/apache/servicemix/file/PollDirectoryTest.java resources/spring-polling.xml
Date Wed, 08 Aug 2007 11:46:57 GMT
Author: gnodet
Date: Wed Aug  8 04:46:57 2007
New Revision: 563819

URL: http://svn.apache.org/viewvc?view=rev&rev=563819
Log:
Fix unit test

Modified:
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-file/src/test/java/org/apache/servicemix/file/PollDirectoryTest.java
    incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-file/src/test/resources/spring-polling.xml

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-file/src/test/java/org/apache/servicemix/file/PollDirectoryTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-file/src/test/java/org/apache/servicemix/file/PollDirectoryTest.java?view=diff&rev=563819&r1=563818&r2=563819
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-file/src/test/java/org/apache/servicemix/file/PollDirectoryTest.java
(original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-file/src/test/java/org/apache/servicemix/file/PollDirectoryTest.java
Wed Aug  8 04:46:57 2007
@@ -16,6 +16,8 @@
  */
 package org.apache.servicemix.file;
 
+import java.io.File;
+
 import javax.jbi.messaging.ExchangeStatus;
 import javax.jbi.messaging.InOnly;
 import javax.jbi.messaging.MessageExchange;
@@ -26,6 +28,7 @@
 import org.apache.servicemix.components.util.DefaultFileMarshaler;
 import org.apache.servicemix.jbi.jaxp.SourceTransformer;
 import org.apache.servicemix.jbi.jaxp.StringSource;
+import org.apache.servicemix.jbi.util.FileUtil;
 import org.apache.servicemix.tck.Receiver;
 import org.apache.servicemix.tck.SpringTestSupport;
 import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
@@ -35,10 +38,9 @@
 
     private static final int NUMBER = 10;
     
-    protected String directoryName = "target/pollDirectory";
-    protected String dynamicURI = "file:" + directoryName;
-    
     public void testSendToWriterSoItCanBePolled() throws Exception {
+        FileUtil.deleteFile(new File("target/pollerFiles"));
+        
         // now lets make a request on this endpoint
         DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
 

Modified: incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-file/src/test/resources/spring-polling.xml
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-file/src/test/resources/spring-polling.xml?view=diff&rev=563819&r1=563818&r2=563819
==============================================================================
--- incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-file/src/test/resources/spring-polling.xml
(original)
+++ incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-file/src/test/resources/spring-polling.xml
Wed Aug  8 04:46:57 2007
@@ -36,7 +36,8 @@
                 <file:poller service="test:poller"
                              endpoint="poller"
                              targetService="test:receiver"
-                             file="file:target/pollerFiles" />
+                             file="file:target/pollerFiles"
+                             period="500" />
             	</file:endpoints>
             </file:component>
         </sm:component>



Mime
View raw message