Skip to content
Browse files

activator registering a GraphDatabaseService

  • Loading branch information...
1 parent 9015b4d commit cbf5068e0bc82dcb4de4be19b48059b68f65416d @peterneubauer peterneubauer committed
Showing with 22 additions and 11 deletions.
  1. +12 −7 pom.xml
  2. +10 −4 src/test/java/org/neo4j/examples/osgi/OSGiTest.java
View
19 pom.xml
@@ -21,7 +21,7 @@
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
- <version>1.3</version>
+ <version>1.4-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -29,6 +29,13 @@
<artifactId>org.osgi.compendium</artifactId>
<version>4.2.0</version>
</dependency>
+<!-- <dependency>
+ <groupId>org.ops4j.pax.runner</groupId>
+ <artifactId>pax-runner-no-jcl</artifactId>
+ <version>1.7.1</version>
+ <scope>test</scope>
+ </dependency>
+ -->
<!-- Pax Exam Dependencies -->
<dependency>
@@ -44,14 +51,12 @@
<version>${paxexamversion}</version>
<scope>test</scope>
</dependency>
-
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-container-native</artifactId>
<version>${paxexamversion}</version>
<scope>test</scope>
</dependency>
-
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-link-mvn</artifactId>
@@ -60,13 +65,13 @@
</dependency>
<!-- OSGi R4 frameworks -->
- <dependency>
+ <!-- <dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.framework</artifactId>
<version>3.2.1</version>
<scope>test</scope>
</dependency>
-
+ -->
<dependency>
<groupId>org.sonatype.tycho</groupId>
<artifactId>org.eclipse.osgi</artifactId>
@@ -78,14 +83,14 @@
<groupId>org.ops4j.pax</groupId>
<artifactId>tinybundles</artifactId>
<version>1.0.0-SNAPSHOT</version>
- <scope>test</scope>
+ <scope>test</scope>
</dependency>
<!-- For sane logging -->
<dependency>
<groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
+ <artifactId>slf4j-simple</artifactId>
<version>1.6.1</version>
<scope>test</scope>
</dependency>
View
14 src/test/java/org/neo4j/examples/osgi/OSGiTest.java
@@ -21,12 +21,15 @@
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.CoreOptions.wrappedBundle;
import static org.ops4j.pax.exam.CoreOptions.provision;
import static org.ops4j.pax.tinybundles.core.TinyBundles.bundle;
import static org.ops4j.pax.tinybundles.core.TinyBundles.withBnd;
import org.junit.Test;
import org.neo4j.graphdb.GraphDatabaseService;
+import org.ops4j.pax.exam.CoreOptions;
+import org.ops4j.pax.exam.options.extra.AutoWrapOption;
import org.ops4j.pax.exam.player.Player;
import org.ops4j.pax.exam.testforge.BundlesInState;
import org.ops4j.pax.exam.testforge.CountBundles;
@@ -43,12 +46,15 @@ public void neo4jStartupTest()
{
new Player().with(
options(
-// CoreOptions.cleanCaches(),
+ CoreOptions.autoWrap(),
+ CoreOptions.felix(),
+ CoreOptions.cleanCaches(),
mavenBundle().groupId( "org.ops4j.pax.logging" ).artifactId( "pax-logging-service" ).version( "1.6.2" ),
mavenBundle().groupId( "javax.transaction" ).artifactId( "com.springsource.javax.transaction" ).version( "1.1.0" ),
mavenBundle().groupId( "org.neo4j" ).artifactId( "neo4j-kernel" ).version( "1.4-SNAPSHOT" ),
-// mavenBundle().groupId( "org.apache.lucene" ).artifactId( "lucene-core" ).version( "3.1.0" ),
-// mavenBundle().groupId( "org.neo4j" ).artifactId( "neo4j-lucene-index" ).version( "1.4-SNAPSHOT" )
+ //TODO: This is not working, the wrap:mvn URL seems to be not supported in the underlying framework
+// wrappedBundle(mavenBundle().groupId( "org.apache.lucene" ).artifactId( "lucene-core" ).version( "3.1.0" )),
+// mavenBundle().groupId( "org.neo4j" ).artifactId( "neo4j-lucene-index" ).version( "1.4-SNAPSHOT" ),
provision( bundle( withBnd() )
.add (Neo4jActivator.class )
.set( Constants.BUNDLE_ACTIVATOR, Neo4jActivator.class.getName() )
@@ -57,7 +63,7 @@ public void neo4jStartupTest()
)
.test( WaitForService.class, GraphDatabaseService.class.getName(), 5000 )
.test( CountBundles.class, 10 )
- .test( BundlesInState.class, Bundle.ACTIVE,Bundle.ACTIVE )
+ .test( BundlesInState.class, Bundle.ACTIVE, Bundle.ACTIVE )
.play();
}

0 comments on commit cbf5068

Please sign in to comment.
Something went wrong with that request. Please try again.