This is an automated email from the ASF dual-hosted git repository.
jan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/master by this push:
new afb7c8e feat: port time funs, as per #883
afb7c8e is described below
commit afb7c8e4f92833fe93b5931bd15f8068bf219260
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]>'].