You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2017/10/29 07:58:38 UTC

[GitHub] janl closed pull request #929: feat: port time funs, as per #883

janl closed pull request #929: feat: port time funs, as per #883
URL: https://github.com/apache/couchdb/pull/929
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/couch/include/couch_eunit.hrl b/src/couch/include/couch_eunit.hrl
index d3000ae5df..8a1527bccc 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 =:=


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services