Return-Path: Delivered-To: apmail-felix-commits-archive@www.apache.org Received: (qmail 16708 invoked from network); 11 Sep 2010 09:13:12 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 11 Sep 2010 09:13:12 -0000 Received: (qmail 50205 invoked by uid 500); 11 Sep 2010 09:13:12 -0000 Delivered-To: apmail-felix-commits-archive@felix.apache.org Received: (qmail 50117 invoked by uid 500); 11 Sep 2010 09:13:10 -0000 Mailing-List: contact commits-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list commits@felix.apache.org Received: (qmail 50110 invoked by uid 99); 11 Sep 2010 09:13:08 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Sep 2010 09:13:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Sep 2010 09:12:48 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2E93723889E1; Sat, 11 Sep 2010 09:12:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r996106 - in /felix/trunk/ipojo/tests/handler/transaction: ./ src/test/java/org/apache/felix/ipojo/transaction/test/ Date: Sat, 11 Sep 2010 09:12:25 -0000 To: commits@felix.apache.org From: clement@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100911091226.2E93723889E1@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: clement Date: Sat Sep 11 09:12:25 2010 New Revision: 996106 URL: http://svn.apache.org/viewvc?rev=996106&view=rev Log: change the transaction service implementation fix some timing issue (waitForService) Modified: felix/trunk/ipojo/tests/handler/transaction/pom.xml felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestAnnotations.java felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestInstallation.java felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestInvalidation.java felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestMandatory.java felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestNever.java felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestNotSupported.java felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestRequires.java felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestRequiresNew.java felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestSupported.java Modified: felix/trunk/ipojo/tests/handler/transaction/pom.xml URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/handler/transaction/pom.xml?rev=996106&r1=996105&r2=996106&view=diff ============================================================================== --- felix/trunk/ipojo/tests/handler/transaction/pom.xml (original) +++ felix/trunk/ipojo/tests/handler/transaction/pom.xml Sat Sep 11 09:12:25 2010 @@ -1,28 +1,28 @@ - - ipojo.tests - ipojo.tests - 1.5.0-SNAPSHOT - + + ipojo.tests + ipojo.tests + 1.5.0-SNAPSHOT + 4.0.0 ipojo.tests tests.transactions @@ -44,12 +44,11 @@ 1.7.0-SNAPSHOT - org.apache.felix - org.apache.felix.transaction - 0.9.0-SNAPSHOT - provided + org.ow2.chameleon + transaction-geronimo + 0.0.1-SNAPSHOT - + org.apache.felix org.apache.felix.ipojo.handler.transaction ${project.version} @@ -59,81 +58,70 @@ org.ow2.chameleon.testing osgi-helpers - - - org.ops4j.pax.exam - pax-exam - 1.2.0 - - - - org.ops4j.pax.exam - pax-exam-container-default + + + org.ops4j.pax.exam + pax-exam + 1.2.0 + + + + org.ops4j.pax.exam + pax-exam-container-default - 1.2.0 - - - - org.ops4j.pax.exam - pax-exam-junit - 1.2.0 - - - junit - junit - 4.5 - jar - test - - - - org.ops4j.pax.swissbox - pax-swissbox-tinybundles - 1.2.0 - - + 1.2.0 + + + + org.ops4j.pax.exam + pax-exam-junit + 1.2.0 + + + junit + junit + 4.5 + jar + test + + + + org.ops4j.pax.swissbox + pax-swissbox-tinybundles + 1.2.0 + + org.ow2.chameleon.testing tinybundles-ipojo - - + + xerces xercesImpl 2.4.0 - - org.ops4j.pax.logging - pax-logging-api - 1.4 - - - org.ops4j.pax.logging - pax-logging-service - 1.4 - - - jmxtools - com.sun.jdmk - - - jmxri - com.sun.jmx - - - mail - javax.mail - - - + + org.ops4j.pax.logging + pax-logging-api + 1.4 + + + org.ops4j.pax.logging + pax-logging-service + 1.4 + + + jmxtools + com.sun.jdmk + + + jmxri + com.sun.jmx + + + @@ -151,7 +139,7 @@ - + org.apache.maven.plugins @@ -174,6 +162,6 @@ - - + + Modified: felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestAnnotations.java URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestAnnotations.java?rev=996106&r1=996105&r2=996106&view=diff ============================================================================== --- felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestAnnotations.java (original) +++ felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestAnnotations.java Sat Sep 11 09:12:25 2010 @@ -1,6 +1,8 @@ package org.apache.felix.ipojo.transaction.test; import static org.ops4j.pax.exam.CoreOptions.mavenBundle; +import static org.ops4j.pax.exam.CoreOptions.*; +import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.*; import static org.ops4j.pax.exam.CoreOptions.options; import static org.ops4j.pax.exam.CoreOptions.provision; import static org.ops4j.pax.exam.MavenUtils.asInProject; @@ -86,14 +88,15 @@ public class TestAnnotations { mavenBundle().groupId("org.ops4j.pax.logging").artifactId("pax-logging-api").version(asInProject()), mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.ipojo").version(asInProject()), mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.ipojo.handler.transaction").version(asInProject()), - mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.transaction").version(asInProject()), + mavenBundle().groupId("org.ow2.chameleon").artifactId("transaction-geronimo").version(asInProject()), mavenBundle().groupId("org.ow2.chameleon.testing").artifactId("osgi-helpers").versionAsInProject() ), provision( service, fooimpl, test - ) + ), + repository("http://maven.ow2.org/maven2-snapshot/") ); return opt; } Modified: felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestInstallation.java URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestInstallation.java?rev=996106&r1=996105&r2=996106&view=diff ============================================================================== --- felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestInstallation.java (original) +++ felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestInstallation.java Sat Sep 11 09:12:25 2010 @@ -4,6 +4,7 @@ import static org.ops4j.pax.exam.CoreOpt import static org.ops4j.pax.exam.CoreOptions.options; import static org.ops4j.pax.exam.CoreOptions.provision; import static org.ops4j.pax.exam.MavenUtils.asInProject; +import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.repository; import static org.ow2.chameleon.testing.tinybundles.ipojo.IPOJOBuilder.withiPOJO; import java.io.File; @@ -102,15 +103,15 @@ public class TestInstallation { mavenBundle().groupId("org.ops4j.pax.logging").artifactId("pax-logging-api").version(asInProject()), mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.ipojo").version(asInProject()), mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.ipojo.handler.transaction").version(asInProject()), - mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.transaction").version(asInProject()), + mavenBundle().groupId("org.ow2.chameleon").artifactId("transaction-geronimo").version(asInProject()), mavenBundle().groupId("org.ow2.chameleon.testing").artifactId("osgi-helpers").versionAsInProject() ), provision( service, fooimpl, test - ) - , + ), + repository("http://maven.ow2.org/maven2-snapshot/"), new Customizer() { @Override public InputStream customizeTestProbe( InputStream testProbe ) @@ -131,6 +132,7 @@ public class TestInstallation { Assert.assertTrue(b.getSymbolicName(), b.getState() == Bundle.ACTIVE); } + osgi.waitForService(TransactionManager.class.getName(), null, 5000); // Transaction Service available osgi.isServiceAvailable(TransactionManager.class.getName()); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); Modified: felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestInvalidation.java URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestInvalidation.java?rev=996106&r1=996105&r2=996106&view=diff ============================================================================== --- felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestInvalidation.java (original) +++ felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestInvalidation.java Sat Sep 11 09:12:25 2010 @@ -5,6 +5,7 @@ import static org.ow2.chameleon.testing. import static org.ops4j.pax.exam.CoreOptions.options; import static org.ops4j.pax.exam.CoreOptions.provision; import static org.ops4j.pax.exam.MavenUtils.asInProject; +import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.repository; import java.io.File; import java.io.InputStream; @@ -96,15 +97,15 @@ public class TestInvalidation { mavenBundle().groupId("org.ops4j.pax.logging").artifactId("pax-logging-api").version(asInProject()), mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.ipojo").version(asInProject()), mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.ipojo.handler.transaction").version(asInProject()), - mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.transaction").version(asInProject()), + mavenBundle().groupId("org.ow2.chameleon").artifactId("transaction-geronimo").version(asInProject()), mavenBundle().groupId("org.ow2.chameleon.testing").artifactId("osgi-helpers").versionAsInProject() ), provision( service, fooimpl, test - ) - , + ), + repository("http://maven.ow2.org/maven2-snapshot/"), new Customizer() { @Override public InputStream customizeTestProbe( InputStream testProbe ) @@ -131,6 +132,7 @@ public class TestInvalidation { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); Modified: felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestMandatory.java URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestMandatory.java?rev=996106&r1=996105&r2=996106&view=diff ============================================================================== --- felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestMandatory.java (original) +++ felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestMandatory.java Sat Sep 11 09:12:25 2010 @@ -4,6 +4,7 @@ import static org.ops4j.pax.exam.CoreOpt import static org.ops4j.pax.exam.CoreOptions.options; import static org.ops4j.pax.exam.CoreOptions.provision; import static org.ops4j.pax.exam.MavenUtils.asInProject; +import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.repository; import java.io.File; import java.io.InputStream; @@ -95,15 +96,15 @@ public class TestMandatory { mavenBundle().groupId("org.ops4j.pax.logging").artifactId("pax-logging-api").version(asInProject()), mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.ipojo").version(asInProject()), mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.ipojo.handler.transaction").version(asInProject()), - mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.transaction").version(asInProject()), + mavenBundle().groupId("org.ow2.chameleon").artifactId("transaction-geronimo").version(asInProject()), mavenBundle().groupId("org.ow2.chameleon.testing").artifactId("osgi-helpers").versionAsInProject() ), provision( service, fooimpl, test - ) - , + ), + repository("http://maven.ow2.org/maven2-snapshot/"), new Customizer() { @Override public InputStream customizeTestProbe( InputStream testProbe ) @@ -143,6 +144,7 @@ public class TestMandatory { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -178,6 +180,7 @@ public class TestMandatory { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -206,6 +209,7 @@ public class TestMandatory { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -248,6 +252,7 @@ public class TestMandatory { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -294,6 +299,7 @@ public class TestMandatory { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -339,6 +345,7 @@ public class TestMandatory { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -398,6 +405,7 @@ public class TestMandatory { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); Modified: felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestNever.java URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestNever.java?rev=996106&r1=996105&r2=996106&view=diff ============================================================================== --- felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestNever.java (original) +++ felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestNever.java Sat Sep 11 09:12:25 2010 @@ -4,6 +4,7 @@ import static org.ops4j.pax.exam.CoreOpt import static org.ops4j.pax.exam.CoreOptions.options; import static org.ops4j.pax.exam.CoreOptions.provision; import static org.ops4j.pax.exam.MavenUtils.asInProject; +import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.repository; import java.io.File; import java.io.InputStream; @@ -93,15 +94,15 @@ public class TestNever { mavenBundle().groupId("org.ops4j.pax.logging").artifactId("pax-logging-api").version(asInProject()), mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.ipojo").version(asInProject()), mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.ipojo.handler.transaction").version(asInProject()), - mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.transaction").version(asInProject()), + mavenBundle().groupId("org.ow2.chameleon").artifactId("transaction-geronimo").version(asInProject()), mavenBundle().groupId("org.ow2.chameleon.testing").artifactId("osgi-helpers").versionAsInProject() ), provision( service, fooimpl, test - ) - , + ), + repository("http://maven.ow2.org/maven2-snapshot/"), new Customizer() { @Override public InputStream customizeTestProbe( InputStream testProbe ) @@ -141,6 +142,7 @@ public class TestNever { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -173,6 +175,7 @@ public class TestNever { Assert.assertNotNull(ref); CheckService cs = (CheckService) osgi.getServiceObject(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); Transaction t = tm.getTransaction(); Modified: felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestNotSupported.java URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestNotSupported.java?rev=996106&r1=996105&r2=996106&view=diff ============================================================================== --- felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestNotSupported.java (original) +++ felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestNotSupported.java Sat Sep 11 09:12:25 2010 @@ -4,6 +4,7 @@ import static org.ops4j.pax.exam.CoreOpt import static org.ops4j.pax.exam.CoreOptions.options; import static org.ops4j.pax.exam.CoreOptions.provision; import static org.ops4j.pax.exam.MavenUtils.asInProject; +import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.repository; import java.io.File; import java.io.InputStream; @@ -93,15 +94,15 @@ public class TestNotSupported { mavenBundle().groupId("org.ops4j.pax.logging").artifactId("pax-logging-api").version(asInProject()), mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.ipojo").version(asInProject()), mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.ipojo.handler.transaction").version(asInProject()), - mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.transaction").version(asInProject()), + mavenBundle().groupId("org.ow2.chameleon").artifactId("transaction-geronimo").version(asInProject()), mavenBundle().groupId("org.ow2.chameleon.testing").artifactId("osgi-helpers").versionAsInProject() ), provision( service, fooimpl, test - ) - , + ), + repository("http://maven.ow2.org/maven2-snapshot/"), new Customizer() { @Override public InputStream customizeTestProbe( InputStream testProbe ) @@ -143,6 +144,7 @@ public class TestNotSupported { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -178,6 +180,7 @@ public class TestNotSupported { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -206,6 +209,7 @@ public class TestNotSupported { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -248,6 +252,7 @@ public class TestNotSupported { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -298,6 +303,7 @@ public class TestNotSupported { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -345,6 +351,7 @@ public class TestNotSupported { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -405,6 +412,7 @@ public class TestNotSupported { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); Modified: felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestRequires.java URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestRequires.java?rev=996106&r1=996105&r2=996106&view=diff ============================================================================== --- felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestRequires.java (original) +++ felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestRequires.java Sat Sep 11 09:12:25 2010 @@ -4,6 +4,7 @@ import static org.ops4j.pax.exam.CoreOpt import static org.ops4j.pax.exam.CoreOptions.options; import static org.ops4j.pax.exam.CoreOptions.provision; import static org.ops4j.pax.exam.MavenUtils.asInProject; +import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.repository; import java.io.File; import java.io.InputStream; @@ -94,15 +95,15 @@ public class TestRequires { mavenBundle().groupId("org.ops4j.pax.logging").artifactId("pax-logging-api").version(asInProject()), mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.ipojo").version(asInProject()), mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.ipojo.handler.transaction").version(asInProject()), - mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.transaction").version(asInProject()), + mavenBundle().groupId("org.ow2.chameleon").artifactId("transaction-geronimo").version(asInProject()), mavenBundle().groupId("org.ow2.chameleon.testing").artifactId("osgi-helpers").versionAsInProject() ), provision( service, fooimpl, test - ) - , + ), + repository("http://maven.ow2.org/maven2-snapshot/"), new Customizer() { @Override public InputStream customizeTestProbe( InputStream testProbe ) @@ -143,6 +144,7 @@ public class TestRequires { Assert.assertNotNull(ref); CheckService cs = (CheckService) osgi.getServiceObject(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); Transaction t = tm.getTransaction(); @@ -177,6 +179,7 @@ public class TestRequires { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -205,6 +208,7 @@ public class TestRequires { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -247,6 +251,7 @@ public class TestRequires { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -297,6 +302,7 @@ public class TestRequires { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -346,6 +352,7 @@ public class TestRequires { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -408,6 +415,7 @@ public class TestRequires { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); Modified: felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestRequiresNew.java URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestRequiresNew.java?rev=996106&r1=996105&r2=996106&view=diff ============================================================================== --- felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestRequiresNew.java (original) +++ felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestRequiresNew.java Sat Sep 11 09:12:25 2010 @@ -4,6 +4,7 @@ import static org.ops4j.pax.exam.CoreOpt import static org.ops4j.pax.exam.CoreOptions.options; import static org.ops4j.pax.exam.CoreOptions.provision; import static org.ops4j.pax.exam.MavenUtils.asInProject; +import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.repository; import java.io.File; import java.io.InputStream; @@ -95,15 +96,15 @@ public class TestRequiresNew { mavenBundle().groupId("org.ops4j.pax.logging").artifactId("pax-logging-api").version(asInProject()), mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.ipojo").version(asInProject()), mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.ipojo.handler.transaction").version(asInProject()), - mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.transaction").version(asInProject()), + mavenBundle().groupId("org.ow2.chameleon").artifactId("transaction-geronimo").version(asInProject()), mavenBundle().groupId("org.ow2.chameleon.testing").artifactId("osgi-helpers").versionAsInProject() ), provision( service, fooimpl, test - ) - , + ), + repository("http://maven.ow2.org/maven2-snapshot/"), new Customizer() { @Override public InputStream customizeTestProbe( InputStream testProbe ) @@ -144,6 +145,7 @@ public class TestRequiresNew { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -188,6 +190,7 @@ public class TestRequiresNew { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -232,6 +235,7 @@ public class TestRequiresNew { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); Modified: felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestSupported.java URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestSupported.java?rev=996106&r1=996105&r2=996106&view=diff ============================================================================== --- felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestSupported.java (original) +++ felix/trunk/ipojo/tests/handler/transaction/src/test/java/org/apache/felix/ipojo/transaction/test/TestSupported.java Sat Sep 11 09:12:25 2010 @@ -4,6 +4,7 @@ import static org.ops4j.pax.exam.CoreOpt import static org.ops4j.pax.exam.CoreOptions.options; import static org.ops4j.pax.exam.CoreOptions.provision; import static org.ops4j.pax.exam.MavenUtils.asInProject; +import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.repository; import java.io.File; import java.io.InputStream; @@ -93,15 +94,15 @@ public class TestSupported { mavenBundle().groupId("org.ops4j.pax.logging").artifactId("pax-logging-api").version(asInProject()), mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.ipojo").version(asInProject()), mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.ipojo.handler.transaction").version(asInProject()), - mavenBundle().groupId("org.apache.felix").artifactId("org.apache.felix.transaction").version(asInProject()), + mavenBundle().groupId("org.ow2.chameleon").artifactId("transaction-geronimo").version(asInProject()), mavenBundle().groupId("org.ow2.chameleon.testing").artifactId("osgi-helpers").versionAsInProject() ), provision( service, fooimpl, test - ) - , + ), + repository("http://maven.ow2.org/maven2-snapshot/"), new Customizer() { @Override public InputStream customizeTestProbe( InputStream testProbe ) @@ -144,6 +145,7 @@ public class TestSupported { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -179,6 +181,7 @@ public class TestSupported { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -207,6 +210,7 @@ public class TestSupported { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -249,6 +253,7 @@ public class TestSupported { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -299,6 +304,7 @@ public class TestSupported { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -348,6 +354,7 @@ public class TestSupported { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin(); @@ -410,6 +417,7 @@ public class TestSupported { ServiceReference ref = ipojo.getServiceReferenceByName(CheckService.class.getName(), under.getInstanceName()); Assert.assertNotNull(ref); + osgi.waitForService(TransactionManager.class.getName(), null, 5000); CheckService cs = (CheckService) osgi.getServiceObject(ref); TransactionManager tm = (TransactionManager) osgi.getServiceObject(TransactionManager.class.getName(), null); tm.begin();