b0VIM 7.3Rr'/YdanielDaniel-Kvasnickas-MacBook-Pro.local~daniel/Projekty/racket-riak/tests/main.rktutf-8 3210#"! UtpGadGaEtA3 r 4 ` % R  | { 2  v T 2  Pp\JIqcC# (empty? (remove* keys (list xstr ystr))))) (delete "b3" ystr) (delete "b3" xstr) [keys (get-all-keys "b3")]) [ystr (put-string "b3" "y")] (let ([xstr (put-string "b3" "x")](test-true "Test that all keys in a bucket are retrieved properly" '()) jsons) jsns) (delete "b2" ystr) (delete "b2" xstr) [jsns (get-all-jsons "b2")]) [ystr (put-json "b2" (hasheq 'x 2))] (let ([xstr (put-json "b2" (hasheq 'x 1))] (remove* (test-equal? "Test that all JSONs in a bucket are retrieved properly" '()) strings) strs) (delete "b1" ystr) (delete "b1" xstr) [strs (get-all-strings "b1")]) [ystr (put-string "b1" "y")] (let ([xstr (put-string "b1" "x")] (remove* (test-equal? "Test that all strings in a bucket are retrieved properly" (equal? val jsonTestValue))) (delete testbucket newKey) [val (get-json newKey testbucket)]) (let* ([newKey (put-json testbucket jsonTestValue)](test-true "Check that put-json actually creates a k/v pair" (string=? val "TEST1"))) (delete testbucket newKey) [val (get-string newKey testbucket)]) (let* ([newKey (put-string testbucket "TEST1")](test-true "Check that put-string actually creates a k/v pair" (string=? val "TEST"))) (delete testbucket newKey) [val (get-string newKey testbucket)]) (let* ([newKey (put testbucket "TEST" ctype.text)](test-true "Check that put actually creates a k/v pair" (get k testbucket)))) (sleep 5) ; This is ugly but we simply have to wait for riak to complete the delete op. [x (delete testbucket k)]) (λ [] (let* ([k (put testbucket "TEST" ctype.text)] (λ [ex] (string=? "404" (exn-message ex)))(test-exn "Check that deletion works"(define jsons (list (hasheq 'x 1) (hasheq 'x 2)))(define strings '("x" "y"))(define jsonTestValue (hasheq 'x (hasheq 'y '(3 4 5))))(define testbucket "racket-riak-test-bucket") "../main.rkt")(require rackunit#lang racket