[jboss-cvs] JBossAS SVN: r87476 - in projects/jboss-osgi/trunk/testsuite/functional: src/test/java/org/jboss/test/osgi/jbosgi39 and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Apr 17 03:24:31 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-04-17 03:24:31 -0400 (Fri, 17 Apr 2009)
New Revision: 87476

Added:
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java
Modified:
   projects/jboss-osgi/trunk/testsuite/functional/pom.xml
Log:
[FELIX-1040] Bundle may start with unresolved packages

Modified: projects/jboss-osgi/trunk/testsuite/functional/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/pom.xml	2009-04-17 06:59:03 UTC (rev 87475)
+++ projects/jboss-osgi/trunk/testsuite/functional/pom.xml	2009-04-17 07:24:31 UTC (rev 87476)
@@ -79,7 +79,7 @@
       <version>${version}</version>
       <scope>provided</scope>
     </dependency>
-    
+
     <!-- Test Dependencies -->
     <dependency>
       <groupId>junit</groupId>
@@ -135,7 +135,7 @@
               <tasks>
                 <property name="maven.runtime.classpath" refid="maven.runtime.classpath" />
                 <property name="tests.output.dir" value="${project.build.directory}" />
-                <ant antfile="scripts/antrun-test-jars.xml"/>
+                <ant antfile="scripts/antrun-test-jars.xml" />
               </tasks>
             </configuration>
           </execution>
@@ -293,6 +293,8 @@
                 <!-- Exclude tests that require remote access -->
                 <exclude>org/jboss/test/osgi/deployer/**</exclude>
                 <exclude>org/jboss/test/osgi/**/*RemoteTestCase.java</exclude>
+                <!-- [FELIX-1040] Bundle may start with unresolved packages -->
+                <exclude>org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java</exclude>
               </excludes>
             </configuration>
           </plugin>
@@ -324,8 +326,9 @@
           <plugin>
             <artifactId>maven-surefire-plugin</artifactId>
             <configuration>
-              <!-- argLine>${surefire.security.args}</argLine -->
               <excludes>
+                <!-- [FELIX-1040] Bundle may start with unresolved packages -->
+                <exclude>org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java</exclude>
               </excludes>
             </configuration>
           </plugin>

Added: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java	2009-04-17 07:24:31 UTC (rev 87476)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.osgi.jbosgi39;
+
+//$Id$
+
+import org.jboss.osgi.spi.framework.OSGiFramework;
+import org.jboss.osgi.spi.junit.OSGiTest;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+
+/**
+ * [FELIX-1040] Bundle may start with unresolved packages
+ * 
+ * https://issues.apache.org/jira/browse/FELIX-1040
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 17-Apr-2009
+ */
+public class FELIX1040TestCase extends OSGiTest
+{
+   public void testVerifyUnresolved() throws Exception
+   {
+      OSGiFramework fwOne = createBootstrapProvider().getFramework();
+      BundleContext ctxOne = fwOne.getSystemBundleContext();
+      
+      Bundle bundleA = ctxOne.installBundle(getTestArchiveURL("jbosgi37-bundleA.jar").toExternalForm());
+      assertEquals("Bundle installed", Bundle.INSTALLED, bundleA.getState());
+      
+      bundleA.start();
+      
+      OSGiFramework fwTwo = createBootstrapProvider().getFramework();
+      BundleContext ctxTwo = fwTwo.getSystemBundleContext();
+      
+      Bundle bundleB = ctxTwo.installBundle(getTestArchiveURL("jbosgi39-bundleB.jar").toExternalForm());
+      assertEquals("Bundle installed", Bundle.INSTALLED, bundleA.getState());
+      
+      try
+      {
+         bundleB.start();
+         fail("Unresolved constraint expected");
+      }
+      catch (BundleException ex)
+      {
+         // expected
+      }
+   }
+}
\ No newline at end of file


Property changes on: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi39/FELIX1040TestCase.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF




More information about the jboss-cvs-commits mailing list