You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2009/04/26 16:55:02 UTC

svn commit: r768714 - in /felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test: ./ recipes/ src/org/apache/felix/framework/test/ src/org/apache/felix/framework/test/fragment/ src/org/apache/felix/framework/test/fragment/b1/ src/org/apache/fe...

Author: rickhall
Date: Sun Apr 26 14:55:02 2009
New Revision: 768714

URL: http://svn.apache.org/viewvc?rev=768714&view=rev
Log:
Reorganized fragment test cases.

Added:
    felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/fragment.b1.bnd
      - copied, changed from r755346, felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/host.bnd
    felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/fragment.b2.bnd
      - copied, changed from r755346, felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/fragment.bnd
    felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/fragment.b3.bnd
      - copied, changed from r755346, felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/requirehost.bnd
    felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/fragment/
    felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/fragment/b1/
    felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/fragment/b1/Host.java
      - copied, changed from r755346, felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/host/Host.java
    felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/fragment/b2/
    felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/fragment/b2/FragmentClass.java
    felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/fragment/b3/
Removed:
    felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/fragment.bnd
    felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/host.bnd
    felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/requirehost.bnd
    felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/host/Host.java
Modified:
    felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/bnd.bnd
    felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/TestFragment.java

Modified: felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/bnd.bnd
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/bnd.bnd?rev=768714&r1=768713&r2=768714&view=diff
==============================================================================
--- felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/bnd.bnd (original)
+++ felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/bnd.bnd Sun Apr 26 14:55:02 2009
@@ -4,8 +4,8 @@
  concurrency.b1.jar, \
  resolver.b1.jar, resolver.b2.jar, resolver.b3.jar, resolver.b4.jar, \
  resolver.b5.jar, resolver.b6.jar, resolver.b7.jar, \
- host.jar, fragment.jar, requirehost.jar, \
- org/apache/felix/framework/test/Message.properties=src/resource/Message.properties,org/apache/felix/framework/test/Message_fr.properties=src/resource/Message_fr.properties
+ fragment.b1.jar, fragment.b2.jar, fragment.b3.jar, \
+ org/apache/felix/framework/test/fragment/Message.properties=src/resource/Message.properties,org/apache/felix/framework/test/fragment/Message_fr.properties=src/resource/Message_fr.properties
 
 -buildpath: \
 	org.osgi.core; version=1.2.0, \

Copied: felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/fragment.b1.bnd (from r755346, felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/host.bnd)
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/fragment.b1.bnd?p2=felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/fragment.b1.bnd&p1=felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/host.bnd&r1=755346&r2=768714&rev=768714&view=diff
==============================================================================
--- felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/host.bnd (original)
+++ felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/fragment.b1.bnd Sun Apr 26 14:55:02 2009
@@ -1,4 +1,4 @@
-Bundle-SymbolicName: org.apache.felix.framework.test.host
-Bundle-Activator: org.apache.felix.framework.test.host.Host
-Private-Package: org.apache.felix.framework.test.host
-Include-Resource: org/apache/felix/framework/test/host/Message.properties=src/resource/Message.properties
+Bundle-SymbolicName: org.apache.felix.framework.test.fragment.b1
+Bundle-Activator: org.apache.felix.framework.test.fragment.b1.Host
+Private-Package: org.apache.felix.framework.test.fragment.b1
+Include-Resource: org/apache/felix/framework/test/fragment/b1/Message.properties=src/resource/Message.properties

Copied: felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/fragment.b2.bnd (from r755346, felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/fragment.bnd)
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/fragment.b2.bnd?p2=felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/fragment.b2.bnd&p1=felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/fragment.bnd&r1=755346&r2=768714&rev=768714&view=diff
==============================================================================
--- felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/fragment.bnd (original)
+++ felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/fragment.b2.bnd Sun Apr 26 14:55:02 2009
@@ -1,4 +1,4 @@
-Bundle-SymbolicName: org.apache.felix.framework.test.fragment
+Bundle-SymbolicName: org.apache.felix.framework.test.fragment.b2
 -resourceonly : true
-Fragment-Host: org.apache.felix.framework.test.host
-Include-Resource: org/apache/felix/framework/test/host/Message_fr.properties=src/resource/Message_fr.properties
+Fragment-Host: org.apache.felix.framework.test.fragment.b1
+Include-Resource: org/apache/felix/framework/test/fragment/b1/Message_fr.properties=src/resource/Message_fr.properties

Copied: felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/fragment.b3.bnd (from r755346, felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/requirehost.bnd)
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/fragment.b3.bnd?p2=felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/fragment.b3.bnd&p1=felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/requirehost.bnd&r1=755346&r2=768714&rev=768714&view=diff
==============================================================================
--- felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/requirehost.bnd (original)
+++ felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/recipes/fragment.b3.bnd Sun Apr 26 14:55:02 2009
@@ -1,3 +1,3 @@
-Bundle-SymbolicName: org.apache.felix.framework.test.requirehost
+Bundle-SymbolicName: org.apache.felix.framework.test.fragment.b3
 -failok : true
-Require-Bundle: org.apache.felix.framework.test.host
+Require-Bundle: org.apache.felix.framework.test.fragment.b1

Modified: felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/TestFragment.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/TestFragment.java?rev=768714&r1=768713&r2=768714&view=diff
==============================================================================
--- felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/TestFragment.java (original)
+++ felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/TestFragment.java Sun Apr 26 14:55:02 2009
@@ -36,8 +36,10 @@
         ResourceBundle enRB, frRB;
 
         // Get local copies of english and french resource bundles.
-        enRB = ResourceBundle.getBundle("org.apache.felix.framework.test.Message");
-        frRB = ResourceBundle.getBundle("org.apache.felix.framework.test.Message", Locale.FRENCH);
+        enRB = ResourceBundle.getBundle(
+            "org.apache.felix.framework.test.fragment.Message");
+        frRB = ResourceBundle.getBundle(
+            "org.apache.felix.framework.test.fragment.Message", Locale.FRENCH);
 
         // Scenario #1
         //
@@ -45,8 +47,8 @@
         // a resource bundle for english by default.
         try
         {
-            is = this.getClass().getClassLoader().getResourceAsStream("host.jar");
-            m_host = getBundleContext().installBundle("host.jar", is);
+            is = this.getClass().getClassLoader().getResourceAsStream("fragment.b1.jar");
+            m_host = getBundleContext().installBundle("fragment.b1.jar", is);
             m_host.start();
             m_hostRB = (ResourceBundle) getBundleContext().getService(
                 getBundleContext().getServiceReference(ResourceBundle.class.getName()));
@@ -73,10 +75,10 @@
         // attached to the host.
         try
         {
-            is = this.getClass().getClassLoader().getResourceAsStream("host.jar");
-            m_host = getBundleContext().installBundle("host.jar", is);
-            is = this.getClass().getClassLoader().getResourceAsStream("fragment.jar");
-            m_fragment = getBundleContext().installBundle("fragment.jar", is);
+            is = this.getClass().getClassLoader().getResourceAsStream("fragment.b1.jar");
+            m_host = getBundleContext().installBundle("fragment.b1.jar", is);
+            is = this.getClass().getClassLoader().getResourceAsStream("fragment.b2.jar");
+            m_fragment = getBundleContext().installBundle("fragment.b2.jar", is);
             m_host.start();
             m_hostRB = (ResourceBundle) getBundleContext().getService(
                 getBundleContext().getServiceReference(ResourceBundle.class.getName()));
@@ -103,10 +105,10 @@
         // still attach to the host.
         try
         {
-            is = this.getClass().getClassLoader().getResourceAsStream("host.jar");
-            m_host = getBundleContext().installBundle("host.jar", is);
-            is = this.getClass().getClassLoader().getResourceAsStream("fragment.jar");
-            m_fragment = getBundleContext().installBundle("fragment.jar", is);
+            is = this.getClass().getClassLoader().getResourceAsStream("fragment.b1.jar");
+            m_host = getBundleContext().installBundle("fragment.b1.jar", is);
+            is = this.getClass().getClassLoader().getResourceAsStream("fragment.b2.jar");
+            m_fragment = getBundleContext().installBundle("fragment.b2.jar", is);
             getPackageAdmin().resolveBundles(new Bundle[] { m_fragment });
             m_host.start();
             m_hostRB = (ResourceBundle) getBundleContext().getService(
@@ -135,12 +137,12 @@
         // the host was indirectly resolved.
         try
         {
-            is = this.getClass().getClassLoader().getResourceAsStream("host.jar");
-            m_host = getBundleContext().installBundle("host.jar", is);
-            is = this.getClass().getClassLoader().getResourceAsStream("fragment.jar");
-            m_fragment = getBundleContext().installBundle("fragment.jar", is);
-            is = this.getClass().getClassLoader().getResourceAsStream("requirehost.jar");
-            m_requirer = getBundleContext().installBundle("requirehost.jar", is);
+            is = this.getClass().getClassLoader().getResourceAsStream("fragment.b1.jar");
+            m_host = getBundleContext().installBundle("fragment.b1.jar", is);
+            is = this.getClass().getClassLoader().getResourceAsStream("fragment.b2.jar");
+            m_fragment = getBundleContext().installBundle("fragment.b2.jar", is);
+            is = this.getClass().getClassLoader().getResourceAsStream("fragment.b3.jar");
+            m_requirer = getBundleContext().installBundle("fragment.b3.jar", is);
             getPackageAdmin().resolveBundles(new Bundle[] { m_requirer });
             m_host.start();
             m_hostRB = (ResourceBundle) getBundleContext().getService(

Copied: felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/fragment/b1/Host.java (from r755346, felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/host/Host.java)
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/fragment/b1/Host.java?p2=felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/fragment/b1/Host.java&p1=felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/host/Host.java&r1=755346&r2=768714&rev=768714&view=diff
==============================================================================
--- felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/host/Host.java (original)
+++ felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/fragment/b1/Host.java Sun Apr 26 14:55:02 2009
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.felix.framework.test.host;
+package org.apache.felix.framework.test.fragment.b1;
 
 import java.util.*;
 import org.osgi.framework.*;
@@ -28,7 +28,8 @@
         try
         {
             ResourceBundle rb;
-            rb = ResourceBundle.getBundle("org.apache.felix.framework.test.host.Message", Locale.FRENCH);
+            rb = ResourceBundle.getBundle(
+                "org.apache.felix.framework.test.fragment.b1.Message", Locale.FRENCH);
             context.registerService(ResourceBundle.class.getName(), rb, null);
         }
         catch (Exception ex)

Added: felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/fragment/b2/FragmentClass.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/fragment/b2/FragmentClass.java?rev=768714&view=auto
==============================================================================
--- felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/fragment/b2/FragmentClass.java (added)
+++ felix/sandbox/rickhall/bnd-test/org.apache.felix.framework.test/src/org/apache/felix/framework/test/fragment/b2/FragmentClass.java Sun Apr 26 14:55:02 2009
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ */
+package org.apache.felix.framework.test.fragment.b2;
+
+public class FragmentClass
+{
+    public FragmentClass()
+    {
+        System.out.println("Hello");
+    }
+}
\ No newline at end of file