You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by dj...@apache.org on 2015/10/20 04:10:59 UTC

svn commit: r1709501 - in /felix/trunk/scr/src/test/java/org/apache/felix/scr/integration: ComponentConcurrencyTest.java ComponentTestBase.java components/concurrency/AFactory.java components/concurrency/CFactory.java

Author: djencks
Date: Tue Oct 20 02:10:58 2015
New Revision: 1709501

URL: http://svn.apache.org/viewvc?rev=1709501&view=rev
Log:
FELIX-5032 fix index out of bounds exception and concealed test failure

Modified:
    felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentConcurrencyTest.java
    felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java
    felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/concurrency/AFactory.java
    felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/concurrency/CFactory.java

Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentConcurrencyTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentConcurrencyTest.java?rev=1709501&r1=1709500&r2=1709501&view=diff
==============================================================================
--- felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentConcurrencyTest.java (original)
+++ felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentConcurrencyTest.java Tue Oct 20 02:10:58 2015
@@ -36,7 +36,8 @@ public class ComponentConcurrencyTest ex
         		"FrameworkEvent ERROR",
         		"Could not get service from ref",
         		"Failed creating the component instance; see log for reason",
-        		"Cannot create component instance due to failure to bind reference"};
+        		"Cannot create component instance due to failure to bind reference",
+        		"DependencyManager : invokeBindMethod : Service not available from service registry for ServiceReference"};
         DS_LOGLEVEL = "warn";
     }
 

Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java?rev=1709501&r1=1709500&r2=1709501&view=diff
==============================================================================
--- felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java (original)
+++ felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java Tue Oct 20 02:10:58 2015
@@ -117,7 +117,8 @@ public abstract class ComponentTestBase
     // method include it when starting the OSGi framework JVM
     protected static String paxRunnerVmOption = null;
 
-    protected static String DS_LOGLEVEL = "debug";
+    //To investigate any problems at all set to "debug"
+    protected static String DS_LOGLEVEL = "warn";
 
     protected static String bsnVersionUniqueness = "single";
 
@@ -916,9 +917,9 @@ public abstract class ComponentTestBase
                 while ( true )
                 {
                     entry = m_logQueue.take();
-                    if ( entry.getLevel() <= 2 )
+                    if ( entry.getLevel() <= 2 && acceptWarning( entry.getMessage() ) )
                     {
-                        if ( m_warnings.size() < 1024 && acceptWarning( entry.getMessage() ) )
+                        if ( m_warnings.size() < 1024 )
                         {
                             m_warnings.add( entry.getMessage() );
                         }

Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/concurrency/AFactory.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/concurrency/AFactory.java?rev=1709501&r1=1709500&r2=1709501&view=diff
==============================================================================
--- felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/concurrency/AFactory.java (original)
+++ felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/concurrency/AFactory.java Tue Oct 20 02:10:58 2015
@@ -15,7 +15,7 @@ import org.osgi.service.component.Compon
 
 public class AFactory implements Runnable {
     private ComponentFactory _aFactory;
-    private Thread[] _threads = new Thread[1];
+    private Thread[] _threads = new Thread[2];
     
     public void bindAFactory(ComponentFactory aFactory) {
       _aFactory = aFactory;

Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/concurrency/CFactory.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/concurrency/CFactory.java?rev=1709501&r1=1709500&r2=1709501&view=diff
==============================================================================
--- felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/concurrency/CFactory.java (original)
+++ felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/components/concurrency/CFactory.java Tue Oct 20 02:10:58 2015
@@ -15,7 +15,7 @@ import org.osgi.service.component.Compon
 
 public class CFactory implements Runnable {
     private ComponentFactory _cFactory;
-    private Thread[] _threads = new Thread[1];
+    private Thread[] _threads = new Thread[2];
     
     public void bindCFactory(ComponentFactory cFactory) {
       _cFactory = cFactory;