FELIX-3680 make test more likely to pass by shutting down activity before checking logs; reduce log level for this test
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1397430 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java b/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java
index cdf06d6..b5c2851 100644
--- a/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java
+++ b/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java
@@ -105,6 +105,8 @@
// 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 @@
),
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;
diff --git a/scr/src/test/java/org/apache/felix/scr/integration/Felix3680Test.java b/scr/src/test/java/org/apache/felix/scr/integration/Felix3680Test.java
index 9fd3f5d..0482597 100644
--- a/scr/src/test/java/org/apache/felix/scr/integration/Felix3680Test.java
+++ b/scr/src/test/java/org/apache/felix/scr/integration/Felix3680Test.java
@@ -64,6 +64,8 @@
// 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 @@
main.enable();
delay(30);
+ main.disable();
+ delay( ); //async deactivate
for (Iterator it = log.foundWarnings().iterator(); it.hasNext();)
{
LogEntry entry = (LogEntry) it.next();