Skip to content

Instantly share code, notes, and snippets.

@bjering
Created August 19, 2010 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjering/6590b4fd7423d10781a7 to your computer and use it in GitHub Desktop.
Save bjering/6590b4fd7423d10781a7 to your computer and use it in GitHub Desktop.
(ns benchmark-chat-server-2
(:use [clojure.test]))
(def users (agent {}))
(defn create-user
[user-name]
(let [new-user {:user-name user-name}]
(send users conj new-user)
new-user))
(deftest test-create-user
(is (= 0 (count @users)))
(create-user "Jonas")
(await users)
(is (= 1 (count @users))))
(run-tests 'benchmark-chat-server-2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment