incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonas Bonér <jo...@jonasboner.com>
Subject Re: Embedded Cassandra for Integration testing
Date Sun, 14 Mar 2010 19:00:37 GMT
Here is an util class from the Akka test suite, embedding Cassandra:

import org.apache.cassandra.service.CassandraDaemon
object EmbeddedCassandraService {

  System.setProperty("storage-config", "src/test/resources");

  val cassandra = new Runnable {

    val cassandraDaemon = new CassandraDaemon
    cassandraDaemon.init(null)

    def run = cassandraDaemon.start

  }

  // spawn cassandra in a new thread
  val t = new Thread(cassandra)
  t.setDaemon(true)
  t.start

  def start: Unit = {}

}

On 14 March 2010 19:08, Ryan Daum <ryan@thimbleware.com> wrote:
> I know people have been successful embedding Cassandra, and I've seen code
> for how to bootstrap it, but I'm wondering what people have done to manage
> its 3rd party dependencies at build time? Especially for Maven projects,
> Cassandra is highly uncooperative as a dependency, as many of its 3rd party
> dependencies have no Maven repository source, and the Cassandra POM has been
> orphaned.
> R
>



-- 
Jonas Bonér

twitter: @jboner
blog:    http://jonasboner.com
work:   http://scalablesolutions.se
code:   http://github.com/jboner
code:   http://akkasource.org
also:    http://letitcrash.com

Mime
View raw message