Author: thomas.diesler(a)jboss.com
Date: 2010-02-07 11:21:24 -0500 (Sun, 07 Feb 2010)
New Revision: 100667
Modified:
projects/jboss-osgi/branches/1.0.0.Beta6/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/BlueprintTestCase.java
Log:
Wait for BP container in first test
Modified:
projects/jboss-osgi/branches/1.0.0.Beta6/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/BlueprintTestCase.java
===================================================================
---
projects/jboss-osgi/branches/1.0.0.Beta6/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/BlueprintTestCase.java 2010-02-07
14:42:29 UTC (rev 100666)
+++
projects/jboss-osgi/branches/1.0.0.Beta6/testsuite/example/src/test/java/org/jboss/test/osgi/example/blueprint/BlueprintTestCase.java 2010-02-07
16:21:24 UTC (rev 100667)
@@ -87,7 +87,7 @@
}
@Test
- public void testBlueprintBundleInstall() throws Exception
+ public void testBlueprintContainerAvailable() throws Exception
{
if (context == null)
BridgeFactory.getBridge().run();
@@ -96,16 +96,7 @@
Bundle bundle = context.getBundle();
assertEquals("example-blueprint", bundle.getSymbolicName());
- }
-
- @Test
- public void testBlueprintContainerAvailable() throws Exception
- {
- if (context == null)
- BridgeFactory.getBridge().run();
- assumeNotNull(context);
-
BlueprintContainer bpContainer = getBlueprintContainer();
assertNotNull("BlueprintContainer available", bpContainer);
}
@@ -145,10 +136,10 @@
private BlueprintContainer getBlueprintContainer() throws Exception
{
// 10sec for processing of STARTING event
- int timeout = 50;
+ int timeout = 10000;
ServiceReference sref = null;
- while (sref == null && 0 < timeout--)
+ while (sref == null && 0 < (timeout -= 200))
{
sref = context.getServiceReference(BlueprintContainer.class.getName());
Thread.sleep(200);
Show replies by date