Skip to content

Instantly share code, notes, and snippets.

@iperdomo
Created November 13, 2015 12:46
Show Gist options
  • Save iperdomo/aa01de10b3c4b35a6711 to your computer and use it in GitHub Desktop.
Save iperdomo/aa01de10b3c4b35a6711 to your computer and use it in GitHub Desktop.
Testing H2 MVStore
(ns h2-test.core-test
(:require [clojure.test :refer :all]
[h2-test.core :refer :all])
(:import [org.h2.mvstore MVStore]
[java.util UUID]))
(deftest a-test
(testing "Testing H2"
(with-open [db (MVStore/open (format "/var/tmp/%s.db" (UUID/randomUUID)))]
(let [m (.openMap db "data")
data ["1" :key-2 {:val true}]]
(.put m :key data)
(is (= (.get m :key) data))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment