You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by cu...@apache.org on 2012/06/17 00:56:52 UTC

svn commit: r1351022 - in /aries/trunk/proxy: proxy-api/ proxy-itests/ proxy-itests/src/test/java/org/apache/aries/proxy/itests/

Author: cumminsh
Date: Sat Jun 16 22:56:52 2012
New Revision: 1351022

URL: http://svn.apache.org/viewvc?rev=1351022&view=rev
Log:
[ARIES-860] Bring proxy.api bundle into line with proxy uber bundle in importing osgi framework at 1.5, rather than 1.6. Add tests to test proxying in both 3.5 and 3.7 equinox environments, and with the uber bundle and normal bundles.

Added:
    aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/AbstractBasicProxyTest.java
      - copied, changed from r1347717, aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/BasicProxyTest.java
    aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/AbstractWeavingProxyTest.java
      - copied, changed from r1347717, aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/WeavingProxyTest.java
    aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/BasicProxyBundlesTest.java
    aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/BasicProxyUberBundleTest.java
    aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/WeavingProxyBundlesTest.java
    aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/WeavingProxyUberBundleTest.java
Removed:
    aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/BasicProxyTest.java
    aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/WeavingProxyTest.java
Modified:
    aries/trunk/proxy/proxy-api/pom.xml
    aries/trunk/proxy/proxy-itests/pom.xml
    aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/AbstractProxyTest.java

Modified: aries/trunk/proxy/proxy-api/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/proxy/proxy-api/pom.xml?rev=1351022&r1=1351021&r2=1351022&view=diff
==============================================================================
--- aries/trunk/proxy/proxy-api/pom.xml (original)
+++ aries/trunk/proxy/proxy-api/pom.xml Sat Jun 16 22:56:52 2012
@@ -47,7 +47,12 @@
         <aries.osgi.export.pkg>
             org.apache.aries.proxy*
         </aries.osgi.export.pkg>
+        <!--
+          We override the import versions for org.osgi.framework because we can operate on
+          a 4.2 framework (we only need 4.3 for weaving which is optional).
+        -->
         <aries.osgi.import.pkg>
+            org.osgi.framework;version="[1.5,2)",
             org.osgi.framework.hooks.weaving;resolution:=optional,
             *
         </aries.osgi.import.pkg>

Modified: aries/trunk/proxy/proxy-itests/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/proxy/proxy-itests/pom.xml?rev=1351022&r1=1351021&r2=1351022&view=diff
==============================================================================
--- aries/trunk/proxy/proxy-itests/pom.xml (original)
+++ aries/trunk/proxy/proxy-itests/pom.xml Sat Jun 16 22:56:52 2012
@@ -69,6 +69,18 @@
             <version>1.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
+            <groupId>org.apache.aries.proxy</groupId>
+            <artifactId>org.apache.aries.proxy.api</artifactId>
+            <scope>test</scope>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.proxy</groupId>
+            <artifactId>org.apache.aries.proxy.impl</artifactId>
+            <scope>test</scope>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
             <groupId>org.apache.aries</groupId>
             <artifactId>org.apache.aries.util</artifactId>
             <scope>test</scope>

Copied: aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/AbstractBasicProxyTest.java (from r1347717, aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/BasicProxyTest.java)
URL: http://svn.apache.org/viewvc/aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/AbstractBasicProxyTest.java?p2=aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/AbstractBasicProxyTest.java&p1=aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/BasicProxyTest.java&r1=1347717&r2=1351022&rev=1351022&view=diff
==============================================================================
--- aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/BasicProxyTest.java (original)
+++ aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/AbstractBasicProxyTest.java Sat Jun 16 22:56:52 2012
@@ -40,7 +40,7 @@ import static org.ops4j.pax.exam.CoreOpt
 import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;
 
 @RunWith(JUnit4TestRunner.class)
-public class BasicProxyTest extends AbstractProxyTest
+public class AbstractBasicProxyTest extends AbstractProxyTest
 {
   /**
    * This test does two things. First of all it checks that we throw a FinalModifierException if we
@@ -63,7 +63,7 @@ public class BasicProxyTest extends Abst
       assertTrue("The message didn't appear in the toString", e.toString().endsWith(msg));
     }
   }
-  
+
   /**
    * This method checks that we correctly fail to proxy a class with final methods.
    * It also does a quick validation on the exception message.
@@ -86,25 +86,4 @@ public class BasicProxyTest extends Abst
       assertTrue("The methods didn't appear in the message", e.getMessage().contains("run"));
     }
   }
-  
-  @org.ops4j.pax.exam.junit.Configuration
-  public static Option[] configuration() {
-      return testOptions(
-          paxLogging("DEBUG"),
-
-          // Bundles
-          mavenBundle("org.apache.aries", "org.apache.aries.util"),
-          mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
-          mavenBundle("org.ow2.asm", "asm-all"),
-          // don't install the blueprint sample here as it will be installed onto the same framework as the blueprint core bundle
-          // mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.sample").noStart(),
-          mavenBundle("org.osgi", "org.osgi.compendium"),
-         /* vmOption ("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),
-          waitForFrameworkStartup(),*/
-          
-          
-          
-          equinox().version("3.5.0")
-      );
-  }
 }
\ No newline at end of file

Modified: aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/AbstractProxyTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/AbstractProxyTest.java?rev=1351022&r1=1351021&r2=1351022&view=diff
==============================================================================
--- aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/AbstractProxyTest.java (original)
+++ aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/AbstractProxyTest.java Sat Jun 16 22:56:52 2012
@@ -18,10 +18,15 @@
  */
 package org.apache.aries.proxy.itests;
 
+import static org.apache.aries.itest.ExtraOptions.flatOptions;
+import static org.apache.aries.itest.ExtraOptions.mavenBundle;
+import static org.apache.aries.itest.ExtraOptions.paxLogging;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
+import static org.ops4j.pax.exam.CoreOptions.equinox;
+
 import java.lang.reflect.Method;
 import java.util.AbstractList;
 import java.util.ArrayList;
@@ -33,6 +38,8 @@ import org.apache.aries.itest.AbstractIn
 import org.apache.aries.proxy.InvocationListener;
 import org.apache.aries.proxy.ProxyManager;
 import org.junit.Test;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.container.def.PaxRunnerOptions;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.FrameworkUtil;
 
@@ -265,4 +272,49 @@ public class AbstractProxyTest extends A
     assertEquals(post, listener.postInvoke);
     assertEquals(ex, listener.postInvokeExceptionalReturn);
   }
+  
+  protected static Option[] generalOptions() {
+	  return  flatOptions(paxLogging("DEBUG"),
+
+	          // Bundles
+	          mavenBundle("org.apache.aries", "org.apache.aries.util"),
+	          mavenBundle("org.ow2.asm", "asm-all"),
+	          // don't install the blueprint sample here as it will be installed onto the same framework as the blueprint core bundle
+	          // mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.sample").noStart(),
+	          mavenBundle("org.osgi", "org.osgi.compendium")
+	         /* vmOption ("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),
+	          waitForFrameworkStartup(),*/
+	  );
+
+  }
+
+  protected static Option[] proxyBundles()
+  {
+	  return new Option[] {          
+	          mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy.api"),
+	          mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy.impl"),
+	  };
+  }
+
+  protected static Option[] proxyUberBundle()
+  {
+	  return new Option[] {          
+	          mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
+	  };
+  }
+
+  protected static Option[] equinox35()
+  {
+	  return new Option[] {          
+	          equinox().version("3.5.0")
+	  };
+  }
+  
+  protected static Option[] equinox37()
+  {
+	  return new Option[] {          
+			  PaxRunnerOptions.rawPaxRunnerOption("config", "classpath:ss-runner.properties"),          
+	          equinox().version("3.7.0.v20110613")
+	  };
+  }
 }

Copied: aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/AbstractWeavingProxyTest.java (from r1347717, aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/WeavingProxyTest.java)
URL: http://svn.apache.org/viewvc/aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/AbstractWeavingProxyTest.java?p2=aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/AbstractWeavingProxyTest.java&p1=aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/WeavingProxyTest.java&r1=1347717&r2=1351022&rev=1351022&view=diff
==============================================================================
--- aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/WeavingProxyTest.java (original)
+++ aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/AbstractWeavingProxyTest.java Sat Jun 16 22:56:52 2012
@@ -45,7 +45,7 @@ import org.osgi.framework.FrameworkUtil;
 import org.osgi.framework.hooks.weaving.WovenClass;
 
 @RunWith(JUnit4TestRunner.class)
-public class WeavingProxyTest extends AbstractProxyTest
+public class AbstractWeavingProxyTest extends AbstractProxyTest
 {
 
   /**
@@ -119,24 +119,6 @@ public class WeavingProxyTest extends Ab
       fail("Proxy should not have been woven!");
   }
 
-  @org.ops4j.pax.exam.junit.Configuration
-  public static Option[] configuration() {
-    return testOptions(
-        paxLogging("DEBUG"),
-
-        // Bundles
-        mavenBundle("org.apache.aries", "org.apache.aries.util"),
-        mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
-        mavenBundle("org.ow2.asm", "asm-all"),
-        // don't install the blueprint sample here as it will be installed onto the same framework as the blueprint core bundle
-        // mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.sample").noStart(),
-        mavenBundle("org.osgi", "org.osgi.compendium"),
-        // org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption("-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),
-        PaxRunnerOptions.rawPaxRunnerOption("config", "classpath:ss-runner.properties"),
-        equinox().version("3.7.0.v20110613")
-    );
-  }
-
   private static class TestFinalDelegate extends AbstractList<String> implements Callable<String> {
 
     @Override

Added: aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/BasicProxyBundlesTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/BasicProxyBundlesTest.java?rev=1351022&view=auto
==============================================================================
--- aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/BasicProxyBundlesTest.java (added)
+++ aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/BasicProxyBundlesTest.java Sat Jun 16 22:56:52 2012
@@ -0,0 +1,74 @@
+/*
+ * 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.aries.proxy.itests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.ops4j.pax.exam.CoreOptions.equinox;
+import static org.apache.aries.itest.ExtraOptions.*;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.concurrent.Callable;
+
+import org.apache.aries.itest.AbstractIntegrationTest;
+import org.apache.aries.proxy.FinalModifierException;
+import org.apache.aries.proxy.ProxyManager;
+import org.apache.aries.proxy.UnableToProxyException;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.CoreOptions;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.container.def.PaxRunnerOptions;
+import org.ops4j.pax.exam.container.def.options.CleanCachesOption;
+import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.FrameworkUtil;
+import static org.ops4j.pax.exam.CoreOptions.waitForFrameworkStartup;
+import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;
+
+/**
+ * This test runs the basic proxy tests for the proxy bundles (not the uber bundle). 
+ * It needs to be a separate class from the uber-bundle test, since equinox configuration
+ * doesn't seem to be cleaned properly within the same test class, so we run with the 
+ * uber-bundle, which means we test nothing.
+ *
+ */
+@RunWith(JUnit4TestRunner.class)
+public class BasicProxyBundlesTest extends AbstractBasicProxyTest
+{
+  @org.ops4j.pax.exam.junit.Configuration
+  public static Option[] configuration35IndividualBundles() {
+      return testOptions(
+          generalOptions(),
+          proxyBundles(),
+          equinox35()
+      );
+  }
+  
+  @org.ops4j.pax.exam.junit.Configuration
+  public static Option[] configuration37IndividualBundles() {
+      return testOptions(
+          generalOptions(), 
+          proxyBundles(),
+          equinox37()
+      );
+  }
+}
\ No newline at end of file

Added: aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/BasicProxyUberBundleTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/BasicProxyUberBundleTest.java?rev=1351022&view=auto
==============================================================================
--- aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/BasicProxyUberBundleTest.java (added)
+++ aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/BasicProxyUberBundleTest.java Sat Jun 16 22:56:52 2012
@@ -0,0 +1,76 @@
+/*
+ * 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.aries.proxy.itests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.ops4j.pax.exam.CoreOptions.equinox;
+import static org.apache.aries.itest.ExtraOptions.*;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.concurrent.Callable;
+
+import org.apache.aries.itest.AbstractIntegrationTest;
+import org.apache.aries.proxy.FinalModifierException;
+import org.apache.aries.proxy.ProxyManager;
+import org.apache.aries.proxy.UnableToProxyException;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.CoreOptions;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.container.def.PaxRunnerOptions;
+import org.ops4j.pax.exam.container.def.options.CleanCachesOption;
+import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.FrameworkUtil;
+import static org.ops4j.pax.exam.CoreOptions.waitForFrameworkStartup;
+import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;
+
+/**
+ * This test runs the basic proxy tests for the proxy uber bundle. 
+ * It needs to be a separate class from the individual-bundle test, since equinox configuration
+ * doesn't seem to be cleaned properly within the same test class, so we always run with the 
+ * uber-bundle, which means we test nothing.
+ *
+ */
+@RunWith(JUnit4TestRunner.class)
+public class BasicProxyUberBundleTest extends AbstractBasicProxyTest
+{
+
+  @org.ops4j.pax.exam.junit.Configuration
+  public static Option[] configuration35UberBundle() {
+      return testOptions(
+          generalOptions(),
+          proxyUberBundle(),
+          equinox35()
+      );
+  }
+  
+  @org.ops4j.pax.exam.junit.Configuration
+  public static Option[] configuration37UberBundle() {
+      return testOptions(
+          generalOptions(), 
+          proxyUberBundle(),
+          equinox37()
+      );
+  }
+
+}
\ No newline at end of file

Added: aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/WeavingProxyBundlesTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/WeavingProxyBundlesTest.java?rev=1351022&view=auto
==============================================================================
--- aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/WeavingProxyBundlesTest.java (added)
+++ aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/WeavingProxyBundlesTest.java Sat Jun 16 22:56:52 2012
@@ -0,0 +1,65 @@
+/*
+ * 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.aries.proxy.itests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.ops4j.pax.exam.CoreOptions.equinox;
+import static org.apache.aries.itest.ExtraOptions.*;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.concurrent.Callable;
+
+import org.apache.aries.itest.AbstractIntegrationTest;
+import org.apache.aries.proxy.FinalModifierException;
+import org.apache.aries.proxy.ProxyManager;
+import org.apache.aries.proxy.UnableToProxyException;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.CoreOptions;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.container.def.PaxRunnerOptions;
+import org.ops4j.pax.exam.container.def.options.CleanCachesOption;
+import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.FrameworkUtil;
+import static org.ops4j.pax.exam.CoreOptions.waitForFrameworkStartup;
+import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;
+
+/**
+ * This test runs the weaving proxy tests for the proxy bundles (not the uber bundle). 
+ * It needs to be a separate class from the uber-bundle test, since equinox configuration
+ * doesn't seem to be cleaned properly within the same test class, so we run with the 
+ * uber-bundle, which means we test nothing.
+ *
+ */
+@RunWith(JUnit4TestRunner.class)
+public class WeavingProxyBundlesTest extends AbstractWeavingProxyTest
+{
+  @org.ops4j.pax.exam.junit.Configuration
+  public static Option[] configuration37IndividualBundles() {
+      return testOptions(
+          generalOptions(), 
+          proxyBundles(),
+          equinox37()
+      );
+  }
+}
\ No newline at end of file

Added: aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/WeavingProxyUberBundleTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/WeavingProxyUberBundleTest.java?rev=1351022&view=auto
==============================================================================
--- aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/WeavingProxyUberBundleTest.java (added)
+++ aries/trunk/proxy/proxy-itests/src/test/java/org/apache/aries/proxy/itests/WeavingProxyUberBundleTest.java Sat Jun 16 22:56:52 2012
@@ -0,0 +1,66 @@
+/*
+ * 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.aries.proxy.itests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.ops4j.pax.exam.CoreOptions.equinox;
+import static org.apache.aries.itest.ExtraOptions.*;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.concurrent.Callable;
+
+import org.apache.aries.itest.AbstractIntegrationTest;
+import org.apache.aries.proxy.FinalModifierException;
+import org.apache.aries.proxy.ProxyManager;
+import org.apache.aries.proxy.UnableToProxyException;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.CoreOptions;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.container.def.PaxRunnerOptions;
+import org.ops4j.pax.exam.container.def.options.CleanCachesOption;
+import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.FrameworkUtil;
+import static org.ops4j.pax.exam.CoreOptions.waitForFrameworkStartup;
+import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;
+
+/**
+ * This test runs the weaving proxy tests for the proxy uber bundle. 
+ * It needs to be a separate class from the individual-bundle test, since equinox configuration
+ * doesn't seem to be cleaned properly within the same test class, so we always run with the 
+ * uber-bundle, which means we test nothing.
+ *
+ */
+@RunWith(JUnit4TestRunner.class)
+public class WeavingProxyUberBundleTest extends AbstractWeavingProxyTest
+{
+  @org.ops4j.pax.exam.junit.Configuration
+  public static Option[] configuration37UberBundle() {
+      return testOptions(
+          generalOptions(), 
+          proxyUberBundle(),
+          equinox37()
+      );
+  }
+
+}
\ No newline at end of file