felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clem...@apache.org
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 GMT
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 @@
 <!--
-	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.
+  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.
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<parent>
-		<groupId>ipojo.tests</groupId>
-		<artifactId>ipojo.tests</artifactId>
-		<version>1.5.0-SNAPSHOT</version>
-	</parent>
+  <parent>
+    <groupId>ipojo.tests</groupId>
+    <artifactId>ipojo.tests</artifactId>
+    <version>1.5.0-SNAPSHOT</version>
+  </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>ipojo.tests</groupId>
   <artifactId>tests.transactions</artifactId>
@@ -44,12 +44,11 @@
       <version>1.7.0-SNAPSHOT</version>
     </dependency>
     <dependency>
-      <groupId>org.apache.felix</groupId>
-      <artifactId>org.apache.felix.transaction</artifactId>
-      <version>0.9.0-SNAPSHOT</version>
-      <scope>provided</scope>
+      <groupId>org.ow2.chameleon</groupId>
+      <artifactId>transaction-geronimo</artifactId>
+      <version>0.0.1-SNAPSHOT</version>
     </dependency>
-        <dependency>
+    <dependency>
       <groupId>org.apache.felix</groupId>
       <artifactId>org.apache.felix.ipojo.handler.transaction</artifactId>
       <version>${project.version}</version>
@@ -59,81 +58,70 @@
       <groupId>org.ow2.chameleon.testing</groupId>
       <artifactId>osgi-helpers</artifactId>
     </dependency>
-  <!--
-    Pax Exam API:
-  -->
-  <dependency>
-    <groupId>org.ops4j.pax.exam</groupId>
-    <artifactId>pax-exam</artifactId>
-    <version>1.2.0</version>
-  </dependency>
-  <!--
-    During runtime Pax Exam will discover the OSGi container to use by
-    searching metadata available into classpath. Pax Exam comes with a
-    default container that uses [Pax Runner] for implementing the
-    container requirements:
-  -->
-  <dependency>
-    <groupId>org.ops4j.pax.exam</groupId>
-    <artifactId>pax-exam-container-default
+    <!-- Pax Exam API: -->
+    <dependency>
+      <groupId>org.ops4j.pax.exam</groupId>
+      <artifactId>pax-exam</artifactId>
+      <version>1.2.0</version>
+    </dependency>
+    <!-- During runtime Pax Exam will discover the OSGi container to use by
+      searching metadata available into classpath. Pax Exam comes with a default
+      container that uses [Pax Runner] for implementing the container requirements: -->
+    <dependency>
+      <groupId>org.ops4j.pax.exam</groupId>
+      <artifactId>pax-exam-container-default
     </artifactId>
-    <version>1.2.0</version>
-  </dependency>
-  <!--
-    If your test code is based on JUnit you will have to have the Junit
-    support artifact:
-  -->
-  <dependency>
-    <groupId>org.ops4j.pax.exam</groupId>
-    <artifactId>pax-exam-junit</artifactId>
-    <version>1.2.0</version>
-  </dependency>
-  <dependency>
-    <groupId>junit</groupId>
-    <artifactId>junit</artifactId>
-    <version>4.5</version>
-    <type>jar</type>
-    <scope>test</scope>
-  </dependency>
-  <!--  Tinybundles -->
-  <dependency>
-    <groupId>org.ops4j.pax.swissbox</groupId>
-    <artifactId>pax-swissbox-tinybundles</artifactId>
-    <version>1.2.0</version>
-  </dependency>
-   <dependency>
+      <version>1.2.0</version>
+    </dependency>
+    <!-- If your test code is based on JUnit you will have to have the Junit
+      support artifact: -->
+    <dependency>
+      <groupId>org.ops4j.pax.exam</groupId>
+      <artifactId>pax-exam-junit</artifactId>
+      <version>1.2.0</version>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.5</version>
+      <type>jar</type>
+      <scope>test</scope>
+    </dependency>
+    <!-- Tinybundles -->
+    <dependency>
+      <groupId>org.ops4j.pax.swissbox</groupId>
+      <artifactId>pax-swissbox-tinybundles</artifactId>
+      <version>1.2.0</version>
+    </dependency>
+    <dependency>
       <groupId>org.ow2.chameleon.testing</groupId>
       <artifactId>tinybundles-ipojo</artifactId>
-  </dependency>
-   <dependency>
+    </dependency>
+    <dependency>
       <groupId>xerces</groupId>
       <artifactId>xercesImpl</artifactId>
       <version>2.4.0</version>
     </dependency>
-   <dependency>
-     <groupId>org.ops4j.pax.logging</groupId>
-     <artifactId>pax-logging-api</artifactId>
-     <version>1.4</version>
-   </dependency>
-   <dependency>
-     <groupId>org.ops4j.pax.logging</groupId>
-     <artifactId>pax-logging-service</artifactId>
-     <version>1.4</version>
-     <exclusions>
-     	<exclusion>
-     		<artifactId>jmxtools</artifactId>
-     		<groupId>com.sun.jdmk</groupId>
-     	</exclusion>
-     	<exclusion>
-     		<artifactId>jmxri</artifactId>
-     		<groupId>com.sun.jmx</groupId>
-     	</exclusion>
-     	<exclusion>
-     		<artifactId>mail</artifactId>
-     		<groupId>javax.mail</groupId>
-     	</exclusion>
-     </exclusions>
-   </dependency>
+    <dependency>
+      <groupId>org.ops4j.pax.logging</groupId>
+      <artifactId>pax-logging-api</artifactId>
+      <version>1.4</version>
+    </dependency>
+    <dependency>
+      <groupId>org.ops4j.pax.logging</groupId>
+      <artifactId>pax-logging-service</artifactId>
+      <version>1.4</version>
+      <exclusions>
+        <exclusion>
+          <artifactId>jmxtools</artifactId>
+          <groupId>com.sun.jdmk</groupId>
+        </exclusion>
+        <exclusion>
+          <artifactId>jmxri</artifactId>
+          <groupId>com.sun.jmx</groupId>
+        </exclusion>
+      </exclusions>
+    </dependency>
 
   </dependencies>
 
@@ -151,7 +139,7 @@
     </repository>
   </repositories>
 
-    <build>
+  <build>
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
@@ -174,6 +162,6 @@
           </execution>
         </executions>
       </plugin>
-      </plugins>
-      </build>
+    </plugins>
+  </build>
 </project>

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();



Mime
View raw message