Author: angelo.vandersijpt at luminis.eu
Date: Fri Oct 29 10:38:57 2010
New Revision: 216

Log:
AMDATU-121 Updated the CassandraDaemonIntegrationTest to use the new dependency 
mechanism.

Modified:
   
trunk/integration-tests/src/test/java/org/amdatu/test/integration/tests/CassandraDaemonIntegrationTest.java

Modified: 
trunk/integration-tests/src/test/java/org/amdatu/test/integration/tests/CassandraDaemonIntegrationTest.java
==============================================================================
--- 
trunk/integration-tests/src/test/java/org/amdatu/test/integration/tests/CassandraDaemonIntegrationTest.java
 (original)
+++ 
trunk/integration-tests/src/test/java/org/amdatu/test/integration/tests/CassandraDaemonIntegrationTest.java
 Fri Oct 29 10:38:57 2010
@@ -25,6 +25,8 @@
 import 
org.amdatu.platform.cassandra.listener.ColumnFamilyDefinition.CompareType;
 import org.amdatu.test.integration.base.IntegrationTestBase;
 import org.apache.cassandra.thrift.InvalidRequestException;
+import org.apache.felix.dm.Component;
+import org.apache.felix.dm.DependencyManager;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Option;
@@ -41,13 +43,24 @@
     private final static String KEYSPACE = "IntegrationTestKeySpace";
     private final static String COLUMNFAMILY = "IntegrationTestColumnFamily";
 
-    private CassandraDaemonService m_daemonService;
+    private volatile CassandraDaemonService m_daemonService;
 
     @Configuration
     public Option[] configure() {
         return super.configure();
     }
 
+    @Override
+    protected Component[] getDependencies(DependencyManager manager) {
+        return new Component[] {
+                manager.createComponent()
+                    .setImplementation(this)
+                    .add(manager.createServiceDependency()
+                        .setService(CassandraDaemonService.class)
+                        .setRequired(true))
+        };
+    }
+
     @Test
     public void testCassandraDaemonService() throws Exception {
         m_daemonService = getService(CassandraDaemonService.class);

Reply via email to