felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r806078 - /felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/MultiServicePIDTest.java
Date Thu, 20 Aug 2009 08:00:41 GMT
Author: fmeschbe
Date: Thu Aug 20 08:00:41 2009
New Revision: 806078

URL: http://svn.apache.org/viewvc?rev=806078&view=rev
Log:
FELIX-1488 Since the reassignement of configuration is desired but not
actually trigger (according to BJ Hargrave) the test cases are modified
to cope with or without configuration reassignment. Currently the tests
run with expecting reassignment disabled.

Modified:
    felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/MultiServicePIDTest.java

Modified: felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/MultiServicePIDTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/MultiServicePIDTest.java?rev=806078&r1=806077&r2=806078&view=diff
==============================================================================
--- felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/MultiServicePIDTest.java
(original)
+++ felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/MultiServicePIDTest.java
Thu Aug 20 08:00:41 2009
@@ -166,8 +166,23 @@
 
             delay();
 
-            // expect configuration reassigned
-            TestCase.assertEquals( bundle2.getLocation(), config.getBundleLocation() );
+            /*
+             * According to BJ Hargrave configuration is not re-dispatched
+             * due to setting the bundle location.
+             * <p>
+             * Therefore, we have two sets one with re-dispatch expectation and
+             * one without re-dispatch expectation.
+             */
+            if ( REDISPATCH_CONFIGURATION_ON_SET_BUNDLE_LOCATION )
+            {
+                // expect configuration reassigned
+                TestCase.assertEquals( bundle2.getLocation(), config.getBundleLocation()
);
+            }
+            else
+            {
+                // expected configuration unbound
+                TestCase.assertNull( config.getBundleLocation() );
+            }
 
             // remove the configuration for good
             deleteConfig( pid );
@@ -232,8 +247,23 @@
 
                 delay();
 
-                // config has to be reassigned
-                TestCase.assertEquals( bundle2.getLocation(), config.getBundleLocation()
);
+                /*
+                 * According to BJ Hargrave configuration is not re-dispatched
+                 * due to setting the bundle location.
+                 * <p>
+                 * Therefore, we have two sets one with re-dispatch expectation and
+                 * one without re-dispatch expectation.
+                 */
+                if ( REDISPATCH_CONFIGURATION_ON_SET_BUNDLE_LOCATION )
+                {
+                    // expect configuration reassigned
+                    TestCase.assertEquals( bundle2.getLocation(), config.getBundleLocation()
);
+                }
+                else
+                {
+                    // expected configuration unbound
+                    TestCase.assertNull( config.getBundleLocation() );
+                }
             }
             else if ( bundle2.getLocation().equals( config.getBundleLocation() ) )
             {
@@ -250,8 +280,23 @@
 
                 delay();
 
-                // config has to be reassigned
-                TestCase.assertEquals( bundle.getLocation(), config.getBundleLocation() );
+                /*
+                 * According to BJ Hargrave configuration is not re-dispatched
+                 * due to setting the bundle location.
+                 * <p>
+                 * Therefore, we have two sets one with re-dispatch expectation and
+                 * one without re-dispatch expectation.
+                 */
+                if ( REDISPATCH_CONFIGURATION_ON_SET_BUNDLE_LOCATION )
+                {
+                    // expect configuration reassigned
+                    TestCase.assertEquals( bundle.getLocation(), config.getBundleLocation()
);
+                }
+                else
+                {
+                    // expected configuration unbound
+                    TestCase.assertNull( config.getBundleLocation() );
+                }
             }
             else
             {



Mime
View raw message