You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by fm...@apache.org on 2012/07/05 14:24:15 UTC

svn commit: r1357574 - in /felix/trunk/configadmin/src/test/java/org/apache/felix/cm: ./ file/ integration/ integration/helper/

Author: fmeschbe
Date: Thu Jul  5 12:24:15 2012
New Revision: 1357574

URL: http://svn.apache.org/viewvc?rev=1357574&view=rev
Log:
Cleanup and improve messages

Modified:
    felix/trunk/configadmin/src/test/java/org/apache/felix/cm/MockBundleContext.java
    felix/trunk/configadmin/src/test/java/org/apache/felix/cm/file/FilePersistenceManagerConstructorTest.java
    felix/trunk/configadmin/src/test/java/org/apache/felix/cm/file/FilePersistenceManagerTest.java
    felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/ConfigurationBaseTest.java
    felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/helper/ConfigureThread.java
    felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/helper/ManagedServiceFactoryThread.java

Modified: felix/trunk/configadmin/src/test/java/org/apache/felix/cm/MockBundleContext.java
URL: http://svn.apache.org/viewvc/felix/trunk/configadmin/src/test/java/org/apache/felix/cm/MockBundleContext.java?rev=1357574&r1=1357573&r2=1357574&view=diff
==============================================================================
--- felix/trunk/configadmin/src/test/java/org/apache/felix/cm/MockBundleContext.java (original)
+++ felix/trunk/configadmin/src/test/java/org/apache/felix/cm/MockBundleContext.java Thu Jul  5 12:24:15 2012
@@ -27,11 +27,9 @@ import java.util.Properties;
 
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
 import org.osgi.framework.BundleListener;
 import org.osgi.framework.Filter;
 import org.osgi.framework.FrameworkListener;
-import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.ServiceListener;
 import org.osgi.framework.ServiceReference;
 import org.osgi.framework.ServiceRegistration;
@@ -103,7 +101,7 @@ public class MockBundleContext implement
      * org.osgi.framework.BundleContext#addServiceListener(org.osgi.framework
      * .ServiceListener, java.lang.String)
      */
-    public void addServiceListener( ServiceListener arg0, String arg1 ) throws InvalidSyntaxException
+    public void addServiceListener( ServiceListener arg0, String arg1 )
     {
     }
 
@@ -112,7 +110,7 @@ public class MockBundleContext implement
      * (non-Javadoc)
      * @see org.osgi.framework.BundleContext#createFilter(java.lang.String)
      */
-    public Filter createFilter( String arg0 ) throws InvalidSyntaxException
+    public Filter createFilter( String arg0 )
     {
         return null;
     }
@@ -124,7 +122,7 @@ public class MockBundleContext implement
      * org.osgi.framework.BundleContext#getAllServiceReferences(java.lang.String
      * , java.lang.String)
      */
-    public ServiceReference[] getAllServiceReferences( String arg0, String arg1 ) throws InvalidSyntaxException
+    public ServiceReference[] getAllServiceReferences( String arg0, String arg1 )
     {
         return null;
     }
@@ -208,7 +206,7 @@ public class MockBundleContext implement
      * org.osgi.framework.BundleContext#getServiceReferences(java.lang.String,
      * java.lang.String)
      */
-    public ServiceReference[] getServiceReferences( String arg0, String arg1 ) throws InvalidSyntaxException
+    public ServiceReference[] getServiceReferences( String arg0, String arg1 )
     {
         return null;
     }
@@ -218,7 +216,7 @@ public class MockBundleContext implement
      * (non-Javadoc)
      * @see org.osgi.framework.BundleContext#installBundle(java.lang.String)
      */
-    public Bundle installBundle( String arg0 ) throws BundleException
+    public Bundle installBundle( String arg0 )
     {
         return null;
     }
@@ -229,7 +227,7 @@ public class MockBundleContext implement
      * @see org.osgi.framework.BundleContext#installBundle(java.lang.String,
      * java.io.InputStream)
      */
-    public Bundle installBundle( String arg0, InputStream arg1 ) throws BundleException
+    public Bundle installBundle( String arg0, InputStream arg1 )
     {
         return null;
     }
@@ -303,29 +301,24 @@ public class MockBundleContext implement
 
     public <S> ServiceRegistration<S> registerService( Class<S> clazz, S service, Dictionary<String, ?> properties )
     {
-        // TODO Auto-generated method stub
         return null;
     }
 
 
     public <S> ServiceReference<S> getServiceReference( Class<S> clazz )
     {
-        // TODO Auto-generated method stub
         return null;
     }
 
 
     public <S> Collection<ServiceReference<S>> getServiceReferences( Class<S> clazz, String filter )
-        throws InvalidSyntaxException
     {
-        // TODO Auto-generated method stub
         return null;
     }
 
 
     public Bundle getBundle( String location )
     {
-        // TODO Auto-generated method stub
         return null;
     }
 }

Modified: felix/trunk/configadmin/src/test/java/org/apache/felix/cm/file/FilePersistenceManagerConstructorTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/configadmin/src/test/java/org/apache/felix/cm/file/FilePersistenceManagerConstructorTest.java?rev=1357574&r1=1357573&r2=1357574&view=diff
==============================================================================
--- felix/trunk/configadmin/src/test/java/org/apache/felix/cm/file/FilePersistenceManagerConstructorTest.java (original)
+++ felix/trunk/configadmin/src/test/java/org/apache/felix/cm/file/FilePersistenceManagerConstructorTest.java Thu Jul  5 12:24:15 2012
@@ -25,9 +25,6 @@ import junit.framework.TestCase;
 import org.apache.felix.cm.MockBundleContext;
 import org.osgi.framework.BundleContext;
 
-/**
- * The <code>FilePersistenceManagerConstructorTest</code> TODO
- */
 public class FilePersistenceManagerConstructorTest extends TestCase
 {
 

Modified: felix/trunk/configadmin/src/test/java/org/apache/felix/cm/file/FilePersistenceManagerTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/configadmin/src/test/java/org/apache/felix/cm/file/FilePersistenceManagerTest.java?rev=1357574&r1=1357573&r2=1357574&view=diff
==============================================================================
--- felix/trunk/configadmin/src/test/java/org/apache/felix/cm/file/FilePersistenceManagerTest.java (original)
+++ felix/trunk/configadmin/src/test/java/org/apache/felix/cm/file/FilePersistenceManagerTest.java Thu Jul  5 12:24:15 2012
@@ -32,9 +32,6 @@ import java.util.Vector;
 import junit.framework.TestCase;
 
 
-/**
- * The <code>FilePersistenceManagerTest</code> TODO
- */
 public class FilePersistenceManagerTest extends TestCase
 {
     private File file = new File( System.getProperty( "java.io.tmpdir" ), "config" );

Modified: felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/ConfigurationBaseTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/ConfigurationBaseTest.java?rev=1357574&r1=1357573&r2=1357574&view=diff
==============================================================================
--- felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/ConfigurationBaseTest.java (original)
+++ felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/ConfigurationBaseTest.java Thu Jul  5 12:24:15 2012
@@ -595,7 +595,7 @@ public class ConfigurationBaseTest exten
 
         // assert activater has no configuration
         TestCase.assertNull( "Expect no Properties after Service Registration", tester.props );
-        TestCase.assertEquals( "Expect no update call", 1, tester.numManagedServiceUpdatedCalls );
+        TestCase.assertEquals( "Expect update call", 1, tester.numManagedServiceUpdatedCalls );
 
         // configure after ManagedServiceRegistration --> configure via update
         configure( pid );
@@ -603,7 +603,7 @@ public class ConfigurationBaseTest exten
 
         // assert activater has configuration
         TestCase.assertNotNull( "Expect Properties after Service Registration", tester.props );
-        TestCase.assertEquals( "Expect a single update call", 2, tester.numManagedServiceUpdatedCalls );
+        TestCase.assertEquals( "Expect a second update call", 2, tester.numManagedServiceUpdatedCalls );
 
         // stop the bundle now
         bundle.stop();

Modified: felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/helper/ConfigureThread.java
URL: http://svn.apache.org/viewvc/felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/helper/ConfigureThread.java?rev=1357574&r1=1357573&r2=1357574&view=diff
==============================================================================
--- felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/helper/ConfigureThread.java (original)
+++ felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/helper/ConfigureThread.java Thu Jul  5 12:24:15 2012
@@ -71,7 +71,7 @@ public class ConfigureThread extends Tes
         }
         catch ( IOException ioe )
         {
-            // TODO: log !!
+            // ignore
         }
     }
 
@@ -85,7 +85,7 @@ public class ConfigureThread extends Tes
         }
         catch ( IOException ioe )
         {
-            // TODO: log !!
+            // ignore
         }
     }
 }
\ No newline at end of file

Modified: felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/helper/ManagedServiceFactoryThread.java
URL: http://svn.apache.org/viewvc/felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/helper/ManagedServiceFactoryThread.java?rev=1357574&r1=1357573&r2=1357574&view=diff
==============================================================================
--- felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/helper/ManagedServiceFactoryThread.java (original)
+++ felix/trunk/configadmin/src/test/java/org/apache/felix/cm/integration/helper/ManagedServiceFactoryThread.java Thu Jul  5 12:24:15 2012
@@ -106,7 +106,7 @@ public class ManagedServiceFactoryThread
         synchronized ( configs )
         {
             configs.add( properties );
-            configured = true;
+            configured = properties != null;
         }
     }
 }
\ No newline at end of file