camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [10/18] git commit: Removed duplicated tests and problematic on some CI boxes.
Date Mon, 24 Feb 2014 16:04:52 GMT
Removed duplicated tests and problematic on some CI boxes.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3eb910c1
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3eb910c1
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3eb910c1

Branch: refs/heads/camel-2.12.x
Commit: 3eb910c165ea7a15082cebeacb6969d9215c7f69
Parents: c744dc6
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Feb 24 15:22:16 2014 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Feb 24 17:05:40 2014 +0100

----------------------------------------------------------------------
 .../processor/ShutdownDirectEndpointTest.java   | 57 ---------------
 .../example/SpringRestletGroovyIssueTest.java   | 77 --------------------
 .../example/SpringRestletGroovyIssueTest.xml    | 40 ----------
 3 files changed, 174 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/3eb910c1/camel-core/src/test/java/org/apache/camel/processor/ShutdownDirectEndpointTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/processor/ShutdownDirectEndpointTest.java
b/camel-core/src/test/java/org/apache/camel/processor/ShutdownDirectEndpointTest.java
deleted file mode 100644
index d2b622b..0000000
--- a/camel-core/src/test/java/org/apache/camel/processor/ShutdownDirectEndpointTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * 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.camel.processor;
-
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-
-/**
- * @version 
- */
-public class ShutdownDirectEndpointTest extends ContextTestSupport {
-
-    public void testShutdownDirectEndpoint() throws Exception {
-        MockEndpoint bar = getMockEndpoint("mock:bar");
-        bar.expectedMessageCount(5);
-
-        // send the bodies async so we can continue
-        template.asyncSendBody("direct:bar", "A");
-        template.asyncSendBody("direct:bar", "B");
-        template.asyncSendBody("direct:bar", "C");
-        template.asyncSendBody("direct:bar", "D");
-        template.asyncSendBody("direct:bar", "E");
-
-        Thread.sleep(10);
-
-        context.stop();
-
-        assertEquals("Should complete all messages", 5, bar.getReceivedCounter());
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            @Override
-            public void configure() throws Exception {
-                from("direct:bar")
-                    .delay(25)
-                    .to("mock:bar");
-            }
-        };
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/3eb910c1/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/SpringRestletGroovyIssueTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/SpringRestletGroovyIssueTest.java
b/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/SpringRestletGroovyIssueTest.java
deleted file mode 100644
index 1879db8..0000000
--- a/tests/camel-itest/src/test/java/org/apache/camel/itest/restlet/example/SpringRestletGroovyIssueTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * 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.camel.itest.restlet.example;
-
-import java.util.Properties;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-import org.apache.camel.test.AvailablePortFinder;
-import org.apache.camel.test.spring.CamelSpringTestSupport;
-import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
-import org.junit.Test;
-import org.springframework.context.support.AbstractApplicationContext;
-
-/**
- * @version 
- */
-public class SpringRestletGroovyIssueTest extends CamelSpringTestSupport {
-
-    private static int port = AvailablePortFinder.getNextAvailable(16001);
-    private ExecutorService executorService = Executors.newFixedThreadPool(5);
-
-    static {
-        //set them as system properties so Spring can use the property placeholder
-        //things to set them into the URL's in the spring contexts
-        System.setProperty("SpringRestletGroovyIssueTest.port", Integer.toString(port));
-    }
-
-    @Override
-    protected Properties useOverridePropertiesWithPropertiesComponent() {
-        Properties prop = new Properties();
-        prop.put("port", port);
-        return prop;
-    }
-
-    @Override
-    protected AbstractApplicationContext createApplicationContext() {
-        return new ClassPathXmlApplicationContext("org/apache/camel/itest/restlet/example/SpringRestletGroovyIssueTest.xml");
-    }
-
-    @Test
-    public void testRestletGroovy() throws Exception {
-        for (int i = 0; i < 10; i++) {
-            final Integer num = i;
-            getMockEndpoint("mock:input").expectedMessageCount(10);
-            getMockEndpoint("mock:output").expectedBodiesReceivedInAnyOrder("0", "1", "2",
"3", "4", "5", "6", "7", "8", "9");
-
-            executorService.submit(new Runnable() {
-                @Override
-                public void run() {
-                    String s = "" + num;
-                    Object response = template.requestBody("restlet:http://localhost:" +
port + "/foo/" + s + "?restletMethod=GET", "");
-                    assertEquals(s, response);
-                };
-            });
-        }
-
-        assertMockEndpointsSatisfied();
-
-        executorService.shutdownNow();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/3eb910c1/tests/camel-itest/src/test/resources/org/apache/camel/itest/restlet/example/SpringRestletGroovyIssueTest.xml
----------------------------------------------------------------------
diff --git a/tests/camel-itest/src/test/resources/org/apache/camel/itest/restlet/example/SpringRestletGroovyIssueTest.xml
b/tests/camel-itest/src/test/resources/org/apache/camel/itest/restlet/example/SpringRestletGroovyIssueTest.xml
deleted file mode 100644
index 662d928..0000000
--- a/tests/camel-itest/src/test/resources/org/apache/camel/itest/restlet/example/SpringRestletGroovyIssueTest.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
-  <camelContext xmlns="http://camel.apache.org/schema/spring">
-    <route>
-      <from uri="restlet:http://localhost:{{SpringRestletGroovyIssueTest.port}}/foo/{id}"/>
-      <to uri="log:input?showHeaders=true"/>
-      <to uri="mock:input"/>
-      <transform>
-        <groovy>request.headers.id</groovy>
-      </transform>
-      <delay>
-        <constant>1000</constant>
-      </delay>
-      <to uri="log:output"/>
-      <to uri="mock:output"/>
-    </route>
-  </camelContext>
-
-</beans>


Mime
View raw message