incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colin Taylor <colin.tay...@gmail.com>
Subject [ANN] ccm-clj - test Cassandra clusters via Clojure
Date Tue, 08 Apr 2014 23:04:58 GMT
Hi, we have released ccm-clj (https://github.com/SMX-LTD/ccm-clj) a Clojure
interface to ccm (https://github.com/pcmanus/ccm) designed specifically for
the creation of arbitrary clusters in Clojure integration tests.

(if (not (ccm/cluster? "testcluster"))
  (do
    (ccm/new! "testcluster" cass-version num-nodes cql-port)
    (ccm/cql! (io/file "./test/resources/test-keyspace.cql"))
    (ccm/cql! (io/resource "schema/test-schema.cql") "testkeyspace")
    (ccm/cql! (io/file "./test/resources/test-data.cql") "testkeyspace"))
  (do
    (ccm/switch! "testcluster")
    (ccm/start! "testcluster")))
....
(ccm/remove! "testcluster")

cheers
Colin Taylor

Mime
View raw message