You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2018/11/22 10:23:35 UTC
[camel] branch master updated: Refactor irc tests
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new adae140 Refactor irc tests
adae140 is described below
commit adae140be9466855798c1d6ffc7080b058fc90c1
Author: Jan <jb...@redhat.com>
AuthorDate: Tue Nov 20 18:44:16 2018 +0100
Refactor irc tests
---
components/camel-irc/pom.xml | 37 ++++++++++++
.../irc/it/IrcIntegrationTestSupport.java | 68 ++++++++++++++++++++++
.../irc/{ => it}/IrcMultiChannelRouteTest.java | 63 ++++++++++----------
.../component/irc/{ => it}/IrcOnReplyTest.java | 18 +++---
.../component/irc/{ => it}/IrcPrivmsgTest.java | 27 ++++-----
.../camel/component/irc/{ => it}/IrcRouteTest.java | 34 +++++------
.../IrcsListUsersTest.java} | 32 +++-------
.../component/irc/{ => it}/IrcsRouteTest.java | 17 ++----
.../IrcsWithSslContextParamsRouteTest.java | 2 +-
...t-list-users.properties => it-tests.properties} | 12 +++-
10 files changed, 195 insertions(+), 115 deletions(-)
diff --git a/components/camel-irc/pom.xml b/components/camel-irc/pom.xml
index 85b7e17..a65b459 100644
--- a/components/camel-irc/pom.xml
+++ b/components/camel-irc/pom.xml
@@ -39,6 +39,43 @@
</camel.osgi.export.service>
</properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>
+ **/it/**
+ </exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>it-tests</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration combine.self="override">
+ <includes>
+ <include>**/*Test.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ </profile>
+ </profiles>
+
<dependencies>
<dependency>
diff --git a/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcIntegrationTestSupport.java b/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcIntegrationTestSupport.java
new file mode 100644
index 0000000..b459749
--- /dev/null
+++ b/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcIntegrationTestSupport.java
@@ -0,0 +1,68 @@
+/**
+ * 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.component.irc.it;
+
+import java.io.IOException;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+import org.apache.camel.EndpointInject;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Before;
+
+public class IrcIntegrationTestSupport extends CamelTestSupport {
+
+ @EndpointInject(uri = "mock:result")
+ protected MockEndpoint resultEndpoint;
+
+ protected Properties properties;
+
+ @Before
+ public void doBefore() throws IOException {
+ properties = loadProperties();
+ resetMock(resultEndpoint);
+ }
+
+ protected void resetMock(MockEndpoint mock) {
+ mock.reset();
+ mock.setResultWaitTime(TimeUnit.MINUTES.toMillis(1));
+ }
+
+ private Properties loadProperties() throws IOException {
+ Properties p = new Properties();
+ p.load(this.getClass().getResourceAsStream("/it-tests.properties"));
+ return p;
+ }
+
+ @Override
+ protected Properties useOverridePropertiesWithPropertiesComponent() {
+ try {
+ return loadProperties();
+ } catch (IOException e) {
+ log.error("Can't load configuration properties");
+ return null;
+ }
+ }
+
+ protected String sendUri() {
+ return "ircs://{{camelTo}}@{{server}}?channels={{channel1}}";
+ }
+
+ protected String fromUri() {
+ return "ircs://{{camelFrom}}@{{server}}?&channels={{channel1}}";
+ }
+}
diff --git a/components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcMultiChannelRouteTest.java b/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcMultiChannelRouteTest.java
similarity index 59%
rename from components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcMultiChannelRouteTest.java
rename to components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcMultiChannelRouteTest.java
index dd1dd73..51f62b2 100644
--- a/components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcMultiChannelRouteTest.java
+++ b/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcMultiChannelRouteTest.java
@@ -14,34 +14,40 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.irc;
+package org.apache.camel.component.irc.it;
import java.util.List;
-
+import java.util.concurrent.TimeUnit;
+import org.apache.camel.EndpointInject;
import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.irc.IrcConstants;
import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Ignore;
import org.junit.Test;
/**
* @version
*/
-public class IrcMultiChannelRouteTest extends CamelTestSupport {
- protected MockEndpoint resultEndpoint;
+public class IrcMultiChannelRouteTest extends IrcIntegrationTestSupport {
protected String body1 = "Message One";
protected String body2 = "Message Two";
protected String body3 = "Message Three";
- private boolean sentMessages;
- @Ignore("test manual, irc.codehaus.org has been closed")
+ @EndpointInject(uri = "mock:joined")
+ private MockEndpoint joined;
+
+
@Test
public void testIrcMessages() throws Exception {
- resultEndpoint = context.getEndpoint("mock:result", MockEndpoint.class);
+ resetMock(joined);
+ joined.expectedMessageCount(2);
+ joined.expectedHeaderValuesReceivedInAnyOrder(IrcConstants.IRC_TARGET, properties.get("channel1"), properties.get("channel2"));
+ joined.assertIsSatisfied();
+
+ sendMessages();
+
//consumer is going to receive two copies of body3
- resultEndpoint.expectedBodiesReceived(body1, body2, body3, body3);
+ resultEndpoint.expectedBodiesReceivedInAnyOrder(body1, body2, body3, body3);
resultEndpoint.assertIsSatisfied();
@@ -56,38 +62,31 @@ public class IrcMultiChannelRouteTest extends CamelTestSupport {
public void configure() throws Exception {
from(fromUri()).
choice().
- when(header(IrcConstants.IRC_MESSAGE_TYPE).isEqualTo("PRIVMSG")).to("mock:result").
- when(header(IrcConstants.IRC_MESSAGE_TYPE).isEqualTo("JOIN")).to("seda:consumerJoined");
+ when(header(IrcConstants.IRC_MESSAGE_TYPE).isEqualTo("PRIVMSG")).to("direct:mock").
+ when(header(IrcConstants.IRC_MESSAGE_TYPE).isEqualTo("JOIN")).to(joined);
- from("seda:consumerJoined").process(new Processor() {
- public void process(Exchange exchange) throws Exception {
- sendMessages();
- }
- });
+ from("direct:mock").filter(e -> !e.getIn().getBody(String.class).contains("VERSION")).to(resultEndpoint);
}
};
}
- protected String sendUri() {
- return "irc://camel-prd@irc.codehaus.org:6667?nickname=camel-prd&channels=#camel-test1,#camel-test2";
- }
- protected String fromUri() {
- return "irc://camel-con@irc.codehaus.org:6667?nickname=camel-con&channels=#camel-test1,#camel-test2";
- }
-
/**
* Lets send messages once the consumer has joined
*/
protected void sendMessages() {
- if (!sentMessages) {
- sentMessages = true;
+ template.sendBodyAndHeader(sendUri(), body1, "irc.target", properties.get("channel1"));
+ template.sendBodyAndHeader(sendUri(), body2, "irc.target", properties.get("channel2"));
+ template.sendBody(sendUri(), body3);
+ }
- // now the consumer has joined, lets send some messages
+ @Override
+ protected String sendUri() {
+ return "ircs://camel-prd@{{server}}?nickname=camel-prd&channels={{channel1}},{{channel2}}";
+ }
- template.sendBodyAndHeader(sendUri(), body1, "irc.target", "#camel-test1");
- template.sendBodyAndHeader(sendUri(), body2, "irc.target", "#camel-test2");
- template.sendBody(sendUri(), body3);
- }
+ @Override
+ protected String fromUri() {
+ return "ircs://camel-con@{{server}}??nickname=camel-con&channels={{channel1}},{{channel2}}";
}
}
diff --git a/components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcOnReplyTest.java b/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcOnReplyTest.java
similarity index 81%
rename from components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcOnReplyTest.java
rename to components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcOnReplyTest.java
index 7f7b076..6a80301 100644
--- a/components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcOnReplyTest.java
+++ b/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcOnReplyTest.java
@@ -14,31 +14,26 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.irc;
+package org.apache.camel.component.irc.it;
import java.util.List;
-
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.irc.IrcConstants;
import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Ignore;
import org.junit.Test;
/**
* @version
*/
-public class IrcOnReplyTest extends CamelTestSupport {
- protected MockEndpoint resultEndpoint;
+public class IrcOnReplyTest extends IrcIntegrationTestSupport {
protected String command = "WHO #camel-test";
- protected String resultEnd = "End of WHO list";
- private boolean sentMessages;
+ protected String resultEnd = "End of /WHO list.";
+ private boolean sentMessages;
- @Ignore("test manual, irc.codehaus.org has been closed")
@Test
public void testIrcMessages() throws Exception {
- resultEndpoint = context.getEndpoint("mock:result", MockEndpoint.class);
resultEndpoint.expectedBodiesReceived(resultEnd);
resultEndpoint.assertIsSatisfied();
@@ -67,7 +62,8 @@ public class IrcOnReplyTest extends CamelTestSupport {
}
protected String fromUri() {
- return "irc://camel-con@irc.codehaus.org:6667?nickname=camel-con&channels=#camel-test&onReply=true";
+ StringBuilder sb = new StringBuilder(super.fromUri());
+ return sb.append("&onReply=true").toString();
}
/**
diff --git a/components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcPrivmsgTest.java b/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcPrivmsgTest.java
similarity index 80%
rename from components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcPrivmsgTest.java
rename to components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcPrivmsgTest.java
index 22716a2..9c06081 100644
--- a/components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcPrivmsgTest.java
+++ b/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcPrivmsgTest.java
@@ -14,13 +14,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.irc;
+package org.apache.camel.component.irc.it;
import java.util.List;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.irc.IrcConstants;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.Ignore;
@@ -29,9 +30,7 @@ import org.junit.Test;
/**
* @version
*/
-public class IrcPrivmsgTest extends CamelTestSupport {
- protected MockEndpoint resultEndpoint;
-
+public class IrcPrivmsgTest extends IrcIntegrationTestSupport {
protected String expectedBody1 = "Message One";
protected String expectedBody2 = "Message Two";
@@ -40,10 +39,8 @@ public class IrcPrivmsgTest extends CamelTestSupport {
private boolean sentMessages;
- @Ignore("test manual, irc.codehaus.org has been closed")
@Test
public void testIrcPrivateMessages() throws Exception {
- resultEndpoint = context.getEndpoint("mock:result", MockEndpoint.class);
resultEndpoint.expectedBodiesReceived(expectedBody1, expectedBody2);
resultEndpoint.assertIsSatisfied();
@@ -59,7 +56,7 @@ public class IrcPrivmsgTest extends CamelTestSupport {
public void configure() throws Exception {
from(fromUri()).
choice().
- when(header(IrcConstants.IRC_MESSAGE_TYPE).isEqualTo("PRIVMSG")).to("mock:result").
+ when(header(IrcConstants.IRC_MESSAGE_TYPE).isEqualTo("PRIVMSG")).to("direct:mock").
when(header(IrcConstants.IRC_MESSAGE_TYPE).isEqualTo("JOIN")).to("seda:consumerJoined");
from("seda:consumerJoined")
@@ -68,28 +65,26 @@ public class IrcPrivmsgTest extends CamelTestSupport {
sendMessages();
}
});
+
+ from("direct:mock").filter(e -> !e.getIn().getBody(String.class).contains("VERSION")).to(resultEndpoint);
}
};
}
+ @Override
protected String sendUri() {
- return "irc://camel-prd@irc.codehaus.org:6667/#camel-test?nickname=camel-prd";
+ return "ircs://{{camelTo}}@{{server}}?channels={{channel1}}&username={{username}}&password={{password}}";
}
- protected String fromUri() {
- return "irc://camel-con@irc.codehaus.org:6667/#camel-test?nickname=camel-con";
- }
-
/**
* Lets send messages once the consumer has joined
*/
- protected void sendMessages() {
+ protected void sendMessages() throws InterruptedException {
if (!sentMessages) {
sentMessages = true;
- // now the consumer has joined, lets send some messages
- template.sendBodyAndHeader(sendUri(), body1, "irc.target", "camel-con");
- template.sendBodyAndHeader(sendUri(), body2, "irc.target", "camel-con");
+ template.sendBodyAndHeader(sendUri(), body1, "irc.target", properties.get("camelFrom"));
+ template.sendBodyAndHeader(sendUri(), body2, "irc.target", properties.get("camelFrom"));
}
}
}
diff --git a/components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcRouteTest.java b/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcRouteTest.java
similarity index 81%
rename from components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcRouteTest.java
rename to components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcRouteTest.java
index 7b3d60f..43d6ce0 100644
--- a/components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcRouteTest.java
+++ b/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcRouteTest.java
@@ -14,13 +14,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.irc;
+package org.apache.camel.component.irc.it;
import java.util.List;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.irc.IrcConstants;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.Ignore;
@@ -29,32 +30,37 @@ import org.junit.Test;
/**
* @version
*/
-public class IrcRouteTest extends CamelTestSupport {
- protected MockEndpoint resultEndpoint;
+public class IrcRouteTest extends IrcIntegrationTestSupport {
protected String body1 = "Message One";
protected String body2 = "Message Two";
private boolean sentMessages;
- @Ignore("test manual, irc.codehaus.org has been closed")
@Test
public void testIrcMessages() throws Exception {
- resultEndpoint = context.getEndpoint("mock:result", MockEndpoint.class);
- resultEndpoint.expectedBodiesReceived(body1, body2);
-
+ resultEndpoint.expectedBodiesReceivedInAnyOrder(body1, body2);
resultEndpoint.assertIsSatisfied();
List<Exchange> list = resultEndpoint.getReceivedExchanges();
for (Exchange exchange : list) {
log.info("Received exchange: " + exchange + " headers: " + exchange.getIn().getHeaders());
}
- }
+ }
+
+ protected String sendUri() {
+ return "irc://{{camelTo}}@{{non.ssl.server}}?channels={{channel1}}";
+ }
+
+ protected String fromUri() {
+ return "irc://{{camelFrom}}@{{non.ssl.server}}?&channels={{channel1}}";
+ }
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
public void configure() throws Exception {
from(fromUri()).
choice().
- when(header(IrcConstants.IRC_MESSAGE_TYPE).isEqualTo("PRIVMSG")).to("mock:result").
+ when(header(IrcConstants.IRC_MESSAGE_TYPE).isEqualTo("PRIVMSG"))
+ .to("direct:mock").
when(header(IrcConstants.IRC_MESSAGE_TYPE).isEqualTo("JOIN")).to("seda:consumerJoined");
from("seda:consumerJoined").process(new Processor() {
@@ -62,17 +68,11 @@ public class IrcRouteTest extends CamelTestSupport {
sendMessages();
}
});
+
+ from("direct:mock").filter(e -> !e.getIn().getBody(String.class).contains("VERSION")).to(resultEndpoint);
}
};
}
-
- protected String sendUri() {
- return "irc://camel-prd-user@irc.codehaus.org:6667/#camel-test?nickname=camel-prd";
- }
-
- protected String fromUri() {
- return "irc://camel-con-user@irc.codehaus.org:6667/#camel-test?nickname=camel-con";
- }
/**
* Lets send messages once the consumer has joined
diff --git a/components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcsListUsersIntegrationTest.java b/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcsListUsersTest.java
similarity index 74%
rename from components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcsListUsersIntegrationTest.java
rename to components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcsListUsersTest.java
index 7e629ee..2956901 100644
--- a/components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcsListUsersIntegrationTest.java
+++ b/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcsListUsersTest.java
@@ -14,17 +14,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.irc;
+package org.apache.camel.component.irc.it;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
+import java.util.concurrent.TimeUnit;
import org.apache.camel.EndpointInject;
import org.apache.camel.RoutesBuilder;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.irc.IrcConfiguration;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -34,27 +37,15 @@ import org.slf4j.LoggerFactory;
* Joins a channel and asserts that the username of the current test user is
* listed for the channel.
*/
-public class IrcsListUsersIntegrationTest extends CamelTestSupport {
+public class IrcsListUsersTest extends IrcIntegrationTestSupport {
- private static final Logger LOGGER = LoggerFactory.getLogger(IrcsListUsersIntegrationTest.class);
+ private static final Logger LOGGER = LoggerFactory.getLogger(IrcsListUsersTest.class);
/** message code for a reply to a <code>NAMES</code> command. */
private static final String IRC_RPL_NAMREPLY = "353";
/** irc component uri. configured by properties */
- private static final String PRODUCER_URI = "ircs:{{test.user}}@{{test.server}}/{{test.room}}";
-
- @EndpointInject(uri = "mock:result")
- protected MockEndpoint resultEndpoint;
-
- protected Properties properties;
-
- public IrcsListUsersIntegrationTest() throws IOException {
- super();
- properties = new Properties();
- InputStream resourceAsStream = this.getClass().getResourceAsStream("/it-list-users.properties");
- properties.load(resourceAsStream);
- }
+ private static final String PRODUCER_URI = "ircs:{{camelFrom}}@{{server}}/{{channel1}}";
@Override
protected RoutesBuilder createRouteBuilder() throws Exception {
@@ -76,17 +67,12 @@ public class IrcsListUsersIntegrationTest extends CamelTestSupport {
@Test
public void test() throws Exception {
- resultEndpoint.setMinimumExpectedMessageCount(1);
+ resultEndpoint.expectedMessageCount(1);
resultEndpoint.assertIsSatisfied();
String body = resultEndpoint.getExchanges().get(0).getIn().getBody(String.class);
LOGGER.debug("Received usernames: [{}]", body);
- String username = properties.getProperty("test.user");
+ String username = properties.getProperty("camelFrom");
assertTrue("userlist does not contain test user", body.contains(username));
}
- @Override
- protected Properties useOverridePropertiesWithPropertiesComponent() {
- return properties;
- }
-
}
diff --git a/components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcsRouteTest.java b/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcsRouteTest.java
similarity index 64%
rename from components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcsRouteTest.java
rename to components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcsRouteTest.java
index d79e5ae..466a9c5 100644
--- a/components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcsRouteTest.java
+++ b/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcsRouteTest.java
@@ -14,25 +14,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.irc;
+package org.apache.camel.component.irc.it;
-import org.junit.Ignore;
-
-@Ignore
public class IrcsRouteTest extends IrcRouteTest {
- // TODO This test is disabled until we can find a public SSL enabled IRC
- // server to test against. To use this you'll need to change the server
- // information below and the username/password.
-
@Override
protected String sendUri() {
- return "ircs://camel-prd@irc.codehaus.org:6667/#camel-test?nickname=camel-prd&password=blah";
+ return "ircs://{{camelTo}}@{{server}}?channels={{channel1}}";
}
- @Override
+ @Override
protected String fromUri() {
- return "ircs://camel-con@irc.codehaus.org:6667/#camel-test?nickname=camel-con&password=blah";
- }
+ return "ircs://{{camelFrom}}@{{server}}?channels={{channel1}}";
+ }
}
\ No newline at end of file
diff --git a/components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcsWithSslContextParamsRouteTest.java b/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcsWithSslContextParamsRouteTest.java
similarity index 98%
rename from components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcsWithSslContextParamsRouteTest.java
rename to components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcsWithSslContextParamsRouteTest.java
index 8faab1a..819771a 100644
--- a/components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcsWithSslContextParamsRouteTest.java
+++ b/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcsWithSslContextParamsRouteTest.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.irc;
+package org.apache.camel.component.irc.it;
import org.apache.camel.impl.JndiRegistry;
import org.apache.camel.util.jsse.KeyStoreParameters;
diff --git a/components/camel-irc/src/test/resources/it-list-users.properties b/components/camel-irc/src/test/resources/it-tests.properties
similarity index 84%
rename from components/camel-irc/src/test/resources/it-list-users.properties
rename to components/camel-irc/src/test/resources/it-tests.properties
index bebe5fb..81bc728 100644
--- a/components/camel-irc/src/test/resources/it-list-users.properties
+++ b/components/camel-irc/src/test/resources/it-tests.properties
@@ -15,6 +15,12 @@
## limitations under the License.
## ---------------------------------------------------------------------------
-test.server=chat.freenode.net:6697
-test.room=#testroom123
-test.user=camel-irc-ituser
+server=chat.freenode.net:6697
+non.ssl.server=chat.freenode.net:8002
+channel1=#camel-test1
+channel2=#testroom2
+username=
+password=
+camelFrom=camel-irc-ituser
+camelTo=camel-prod
+