Skip to content

Commit

Permalink
try to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Jul 26, 2021
1 parent 0408f36 commit ef5572f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions test/test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ module Make(Client : Redis.S.Client)(U : UTILS with module IO = Client.IO) : sig
val suite : string -> OUnit2.test
val teardown : unit -> unit
val redis_specs : containers
val redis_spec_no_auth : Client.connection_spec
val bracket : ?spec:Client.connection_spec -> (Client.connection -> 'a Client.IO.t) -> 'ctx -> 'a
end = struct

Expand All @@ -60,6 +61,8 @@ end = struct
with_acl = Client.({host=redis_test_host (); port=redis_test_port_with_acl });
}

let redis_spec_no_auth = redis_specs.no_auth

let io_assert msg check result =
IO.return (assert_bool msg (check result))

Expand Down
4 changes: 2 additions & 2 deletions test/test_lwt.ml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ module Test_lwt_fib = struct
OUnit.assert_equal ~printer:string_of_int ref res;
Lwt.return ()

let bracket test_case () =
let bracket test_case _ctx =
try
Lwt_main.run @@ P.with_pool ~size:32 Test_lwt.redis_spec test_case
Lwt_main.run @@ P.with_pool ~size:32 Test_lwt.redis_spec_no_auth test_case
with C.Unexpected reply as exn ->
Printf.eprintf "Got unexpected reply: %s\n" (C.string_of_reply reply);
raise exn
Expand Down

0 comments on commit ef5572f

Please sign in to comment.