This is an automated email from the ASF dual-hosted git repository. wohali pushed a commit to branch 2.1.x in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 9a50a62409d796d6c25c788aaa99cb988f7c0d04 Author: Jan Lehnardt <[email protected]> AuthorDate: Sat Oct 28 13:51:21 2017 +0200 feat: port time funs, as per #883 --- src/couch/include/couch_eunit.hrl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/couch/include/couch_eunit.hrl b/src/couch/include/couch_eunit.hrl index d3000ae..8a1527b 100644 --- a/src/couch/include/couch_eunit.hrl +++ b/src/couch/include/couch_eunit.hrl @@ -40,22 +40,21 @@ -define(tempfile, fun() -> - {A, B, C} = erlang:now(), + A = integer_to_list(couch_util:unique_monotonic_integer()), N = node(), - FileName = lists:flatten(io_lib:format("~p-~p.~p.~p", [N, A, B, C])), + FileName = lists:flatten(io_lib:format("~p-~p", [N, A])), filename:join([?TEMPDIR, FileName]) end). -define(tempdb, fun() -> - Nums = tuple_to_list(erlang:now()), + Nums = integer_to_list(couch_util:unique_monotonic_integer()), Prefix = "eunit-test-db", Suffix = lists:concat([integer_to_list(Num) || Num <- Nums]), list_to_binary(Prefix ++ "-" ++ Suffix) end). -define(docid, fun() -> - {A, B, C} = erlang:now(), - lists:flatten(io_lib:format("~p~p~p", [A, B, C])) + integer_to_list(couch_util:unique_monotonic_integer()) end). %% Like assertEqual, but using == instead of =:= -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
