Blob Blame History Raw
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Thu, 14 Mar 2019 16:31:12 +0300
Subject: [PATCH] Use more unpredictable tempdb name

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>

diff --git a/test/couchdb/include/couch_eunit.hrl.in b/test/couchdb/include/couch_eunit.hrl.in
index d30fa24bc..df133104a 100644
--- a/test/couchdb/include/couch_eunit.hrl.in
+++ b/test/couchdb/include/couch_eunit.hrl.in
@@ -32,10 +32,9 @@
     end).
 -define(tempdb,
     fun() ->
-            Nums = tuple_to_list(erlang:timestamp()),
-            Prefix = "eunit-test-db",
-            Suffix = lists:concat([integer_to_list(Num) || Num <- Nums]),
-            list_to_binary(Prefix ++ "-" ++ Suffix)
+            Prefix = <<"eunit-test-db">>,
+            Suffix = couch_uuids:random(),
+            <<Prefix/binary, "-", Suffix/binary>>
     end).
 -define(docid,
     fun() ->