You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@synapse.apache.org by ve...@apache.org on 2009/08/09 18:58:25 UTC

svn commit: r802557 - in /synapse/trunk/java/modules/transports/core/vfs/src/test/java/org/apache/synapse/transport/vfs: VFSTransportDescriptionFactory.java VFSTransportTest.java

Author: veithen
Date: Sun Aug  9 16:58:25 2009
New Revision: 802557

URL: http://svn.apache.org/viewvc?rev=802557&view=rev
Log:
SYNAPSE-565: Enable locking during tests.

Added:
    synapse/trunk/java/modules/transports/core/vfs/src/test/java/org/apache/synapse/transport/vfs/VFSTransportDescriptionFactory.java   (with props)
Modified:
    synapse/trunk/java/modules/transports/core/vfs/src/test/java/org/apache/synapse/transport/vfs/VFSTransportTest.java

Added: synapse/trunk/java/modules/transports/core/vfs/src/test/java/org/apache/synapse/transport/vfs/VFSTransportDescriptionFactory.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/core/vfs/src/test/java/org/apache/synapse/transport/vfs/VFSTransportDescriptionFactory.java?rev=802557&view=auto
==============================================================================
--- synapse/trunk/java/modules/transports/core/vfs/src/test/java/org/apache/synapse/transport/vfs/VFSTransportDescriptionFactory.java (added)
+++ synapse/trunk/java/modules/transports/core/vfs/src/test/java/org/apache/synapse/transport/vfs/VFSTransportDescriptionFactory.java Sun Aug  9 16:58:25 2009
@@ -0,0 +1,44 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.synapse.transport.vfs;
+
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.description.TransportInDescription;
+import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.transport.testkit.axis2.TransportDescriptionFactory;
+
+public class VFSTransportDescriptionFactory implements TransportDescriptionFactory {
+    public TransportInDescription createTransportInDescription() throws Exception {
+        TransportInDescription trpInDesc = new TransportInDescription("vfs");
+        trpInDesc.setReceiver(new VFSTransportListener());
+        trpInDesc.addParameter(new Parameter(VFSConstants.TRANSPORT_FILE_LOCKING,
+                VFSConstants.TRANSPORT_FILE_LOCKING_ENABLED));
+        return trpInDesc;
+    }
+
+    public TransportOutDescription createTransportOutDescription() throws Exception {
+        TransportOutDescription trpOutDesc = new TransportOutDescription("vfs");
+        trpOutDesc.setSender(new VFSTransportSender());
+        trpOutDesc.addParameter(new Parameter(VFSConstants.TRANSPORT_FILE_LOCKING,
+                VFSConstants.TRANSPORT_FILE_LOCKING_ENABLED));
+        return trpOutDesc;
+    }
+
+}

Propchange: synapse/trunk/java/modules/transports/core/vfs/src/test/java/org/apache/synapse/transport/vfs/VFSTransportDescriptionFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: synapse/trunk/java/modules/transports/core/vfs/src/test/java/org/apache/synapse/transport/vfs/VFSTransportTest.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/core/vfs/src/test/java/org/apache/synapse/transport/vfs/VFSTransportTest.java?rev=802557&r1=802556&r2=802557&view=diff
==============================================================================
--- synapse/trunk/java/modules/transports/core/vfs/src/test/java/org/apache/synapse/transport/vfs/VFSTransportTest.java (original)
+++ synapse/trunk/java/modules/transports/core/vfs/src/test/java/org/apache/synapse/transport/vfs/VFSTransportTest.java Sun Aug  9 16:58:25 2009
@@ -26,8 +26,6 @@
 
 import org.apache.axis2.transport.testkit.ManagedTestSuite;
 import org.apache.axis2.transport.testkit.TransportTestSuiteBuilder;
-import org.apache.axis2.transport.testkit.axis2.SimpleTransportDescriptionFactory;
-import org.apache.axis2.transport.testkit.axis2.TransportDescriptionFactory;
 import org.apache.axis2.transport.testkit.axis2.client.AxisAsyncTestClient;
 import org.apache.axis2.transport.testkit.axis2.endpoint.AxisAsyncEndpoint;
 import org.apache.axis2.transport.testkit.axis2.endpoint.AxisEchoEndpoint;
@@ -44,15 +42,12 @@
         // Since VFS has no Content-Type header, SwA is not supported.
         suite.addExclude("(test=AsyncSwA)");
         
-        TransportDescriptionFactory tdf =
-            new SimpleTransportDescriptionFactory("vfs", VFSTransportListener.class,
-                    VFSTransportSender.class);
-        
         TransportTestSuiteBuilder builder = new TransportTestSuiteBuilder(suite);
         
         ContentTypeServiceConfigurator cfgtr = new ContentTypeServiceConfigurator("transport.vfs.ContentType");
         
-        builder.addEnvironment(new VFSTestEnvironment(new File("target/vfs3")), tdf);
+        builder.addEnvironment(new VFSTestEnvironment(new File("target/vfs3")),
+                new VFSTransportDescriptionFactory());
         
         builder.addAsyncChannel(new VFSAsyncFileChannel("req/in"));