You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2009/12/30 03:17:58 UTC
svn commit: r894532 - in /camel/trunk/tests:
camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/protobuf/ProtobufRouteTest.java
camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncTest.java
Author: ningjiang
Date: Wed Dec 30 02:17:57 2009
New Revision: 894532
URL: http://svn.apache.org/viewvc?rev=894532&view=rev
Log:
Fixed the eclipses errors
Modified:
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/protobuf/ProtobufRouteTest.java
camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncTest.java
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/protobuf/ProtobufRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/protobuf/ProtobufRouteTest.java?rev=894532&r1=894531&r2=894532&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/protobuf/ProtobufRouteTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/protobuf/ProtobufRouteTest.java Wed Dec 30 02:17:57 2009
@@ -16,47 +16,27 @@
*/
package org.apache.camel.itest.osgi.protobuf;
-import java.io.InputStream;
-import java.util.HashMap;
-
-import javax.mail.Address;
-import javax.mail.Message;
-import javax.mail.Message.RecipientType;
-
import org.apache.camel.CamelException;
-import org.apache.camel.Exchange;
import org.apache.camel.FailedToCreateRouteException;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.converter.IOConverter;
import org.apache.camel.dataformat.protobuf.ProtobufDataFormat;
-
import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
import org.apache.camel.itest.osgi.protobuf.generated.AddressBookProtos;
import org.apache.camel.itest.osgi.protobuf.generated.AddressBookProtos.Person;
-import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.jvnet.mock_javamail.Mailbox;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.Configuration;
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
-import org.ops4j.pax.swissbox.tinybundles.dp.Constants;
import static org.ops4j.pax.exam.CoreOptions.felix;
-import static org.ops4j.pax.exam.CoreOptions.bundle;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.options;
-import static org.ops4j.pax.exam.CoreOptions.provision;
-import static org.ops4j.pax.exam.CoreOptions.wrappedBundle;
-import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.logProfile;
import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.profile;
import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
-import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
-import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.withBnd;
-
@RunWith(JUnit4TestRunner.class)
public class ProtobufRouteTest extends OSGiIntegrationTestSupport {
@@ -147,14 +127,6 @@
scanFeatures(mavenBundle().groupId("org.apache.camel.karaf").
artifactId("apache-camel").versionAsInProject().type("xml/features"),
"camel-core", "camel-spring-osgi", "camel-test", "camel-protobuf"),
- // create a bundle that has the protobuf class
- /*provision(newBundle().add(AddressBookProtos.class)
- .add(AddressBookProtos.AddressBook.class)
- .add(AddressBookProtos.Person.class)
- .set(Constants.BUNDLE_SYMBOLICNAME, "CamelProtoBufTinyBundle")
- .set(Constants.EXPORT_PACKAGE, "org.apache.camel.itest.osgi.protobuf.generated")
- .build()),*/
-
felix());
Modified: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncTest.java?rev=894532&r1=894531&r2=894532&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncTest.java (original)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/async/HttpAsyncTest.java Wed Dec 30 02:17:57 2009
@@ -27,7 +27,8 @@
* @version $Revision$
*/
public class HttpAsyncTest extends CamelTestSupport {
-
+
+ @SuppressWarnings("unchecked")
@Test
public void testAsyncAndSyncAtSameTimeWithHttp() throws Exception {
// START SNIPPET: e2
@@ -52,13 +53,13 @@
// (waiting if needed) and then return a string body response.
// This allows us to do this in a single code line instead of using the
// JDK Future API to get hold of it, but you can also use that if you want
- String response = template.extractFutureBody(future, String.class);
+ String response = (String)template.extractFutureBody(future, String.class);
assertEquals("Bye World", response);
assertMockEndpointsSatisfied();
// END SNIPPET: e2
}
-
+
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {