Author: davsclaus Date: Mon Sep 24 06:36:03 2012 New Revision: 1389220 URL: http://svn.apache.org/viewvc?rev=1389220&view=rev Log: Fixed compilation error with osgi tests.
Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jclouds/BlobStoreBlueprintRouteTest.java camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/krati/KratiBlueprintRouteTest.java Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jclouds/BlobStoreBlueprintRouteTest.java URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jclouds/BlobStoreBlueprintRouteTest.java?rev=1389220&r1=1389219&r2=1389220&view=diff ============================================================================== --- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jclouds/BlobStoreBlueprintRouteTest.java (original) +++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jclouds/BlobStoreBlueprintRouteTest.java Mon Sep 24 06:36:03 2012 @@ -27,11 +27,9 @@ import org.jclouds.blobstore.BlobStoreCo import org.jclouds.blobstore.BlobStoreContextFactory; import org.junit.Test; import org.junit.runner.RunWith; -import org.ops4j.pax.exam.Inject; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.Configuration; import org.ops4j.pax.exam.junit.JUnit4TestRunner; -import org.osgi.framework.BundleContext; import org.osgi.framework.Constants; import static org.ops4j.pax.exam.CoreOptions.felix; import static org.ops4j.pax.exam.CoreOptions.provision; @@ -44,9 +42,6 @@ public class BlobStoreBlueprintRouteTest private static final String TEST_CONTAINER = "testContainer"; - @Inject - protected BundleContext bundleContext; - /** * Strategy to perform any pre setup, before {@link org.apache.camel.CamelContext} is created */ @@ -67,9 +62,13 @@ public class BlobStoreBlueprintRouteTest MockEndpoint mock = ctx.getEndpoint("mock:results", MockEndpoint.class); ProducerTemplate template = ctx.createProducerTemplate(); mock.expectedMessageCount(2); + template.sendBodyAndHeader("direct:start", "Test 1", JcloudsConstants.BLOB_NAME, "blob1"); template.sendBodyAndHeader("direct:start", "Test 2", JcloudsConstants.BLOB_NAME, "blob2"); + assertMockEndpointsSatisfied(); + + template.stop(); } @Configuration Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/krati/KratiBlueprintRouteTest.java URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/krati/KratiBlueprintRouteTest.java?rev=1389220&r1=1389219&r2=1389220&view=diff ============================================================================== --- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/krati/KratiBlueprintRouteTest.java (original) +++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/krati/KratiBlueprintRouteTest.java Mon Sep 24 06:36:03 2012 @@ -23,13 +23,10 @@ import org.apache.camel.component.mock.M import org.apache.camel.itest.osgi.blueprint.OSGiBlueprintTestSupport; import org.junit.Test; import org.junit.runner.RunWith; -import org.ops4j.pax.exam.Inject; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.Configuration; import org.ops4j.pax.exam.junit.JUnit4TestRunner; -import org.osgi.framework.BundleContext; import org.osgi.framework.Constants; -import org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext; import static org.ops4j.pax.exam.CoreOptions.provision; import static org.ops4j.pax.exam.OptionUtils.combine; @@ -38,22 +35,21 @@ import static org.ops4j.pax.swissbox.tin @RunWith(JUnit4TestRunner.class) public class KratiBlueprintRouteTest extends OSGiBlueprintTestSupport { - protected OsgiBundleXmlApplicationContext applicationContext; - - @Inject - protected BundleContext bundleContext; - @Test public void testProducerConsumerAndIdempotent() throws Exception { - //getInstalledBundle("CamelBlueprintKratiTestBundle").start(); CamelContext ctx = getOsgiService(CamelContext.class, "(camel.context.symbolicname=CamelBlueprintKratiTestBundle)", 20000); + MockEndpoint mock = ctx.getEndpoint("mock:results", MockEndpoint.class); ProducerTemplate template = ctx.createProducerTemplate(); mock.expectedMessageCount(2); + template.sendBodyAndHeader("direct:put", new SomeObject("1", "Test 1"), KratiConstants.KEY, "1"); template.sendBodyAndHeader("direct:put", new SomeObject("2", "Test 2"), KratiConstants.KEY, "2"); template.sendBodyAndHeader("direct:put", new SomeObject("3", "Test 3"), KratiConstants.KEY, "1"); + assertMockEndpointsSatisfied(); + + template.stop(); } @Configuration