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 2012/10/12 06:26:02 UTC

svn commit: r1397430 - in /felix/trunk/scr/src/test/java/org/apache/felix/scr/integration: ComponentTestBase.java Felix3680Test.java

Author: djencks
Date: Fri Oct 12 04:26:02 2012
New Revision: 1397430

URL: http://svn.apache.org/viewvc?rev=1397430&view=rev
Log:
FELIX-3680 make test more likely to pass by shutting down activity before checking logs; reduce log level for this test

Modified:
    felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java
    felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/Felix3680Test.java

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=1397430&r1=1397429&r2=1397430&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 Fri Oct 12 04:26:02 2012
@@ -105,6 +105,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";
+
     // the descriptor file to use for the installed test bundle
     protected static String descriptorFile = "/integration_test_simple_components.xml";
 
@@ -147,7 +149,7 @@ public abstract class ComponentTestBase
              ),
              junitBundles(),
              systemProperty( "ds.factory.enabled" ).value( Boolean.toString( NONSTANDARD_COMPONENT_FACTORY_BEHAVIOR ) ),
-             systemProperty( "ds.loglevel" ).value( "debug" )
+             systemProperty( "ds.loglevel" ).value( DS_LOGLEVEL )
 
         );
         final Option vmOption = ( paxRunnerVmOption != null ) ? CoreOptions.vmOption( paxRunnerVmOption ) : null;

Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/Felix3680Test.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/Felix3680Test.java?rev=1397430&r1=1397429&r2=1397430&view=diff
==============================================================================
--- felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/Felix3680Test.java (original)
+++ felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/Felix3680Test.java Fri Oct 12 04:26:02 2012
@@ -64,6 +64,8 @@ public class Felix3680Test extends Compo
         // uncomment to enable debugging of this test class
         //        paxRunnerVmOption = DEBUG_VM_OPTION;
         descriptorFile = "/integration_test_FELIX_3680.xml";
+        //comment to get debug logging if the test fails.
+        DS_LOGLEVEL = "info";
     }
 
     @Inject
@@ -89,6 +91,8 @@ public class Felix3680Test extends Compo
         main.enable();
 
         delay(30);
+        main.disable();
+        delay( ); //async deactivate
         for (Iterator it = log.foundWarnings().iterator(); it.hasNext();)
         {
             LogEntry entry = (LogEntry) it.next();