summaryrefslogtreecommitdiff
path: root/src/ddoc_cache
diff options
context:
space:
mode:
authorNick Vatamaniuc <vatamane@apache.org>2017-10-03 02:14:22 -0400
committerNick Vatamaniuc <nickva@users.noreply.github.com>2017-10-05 11:40:41 -0400
commit75984da4b22003d0e46a9fe1001978d999387636 (patch)
treef2c797dd5771ce468abd931d6bfe9d04c51ac2c0 /src/ddoc_cache
parent4963f66653e29d913eba4811b1b88d931877193f (diff)
downloadcouchdb-75984da4b22003d0e46a9fe1001978d999387636.tar.gz
Handle deprecated random module
Use erlang release version to decide if the newer `rand` module is present or not. `erlang:function_exported(rand, uniform, 0)` could not be used here as it returns false when function isn't loaded, even if module and function are both available.
Diffstat (limited to 'src/ddoc_cache')
-rw-r--r--src/ddoc_cache/test/ddoc_cache_lru_test.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ddoc_cache/test/ddoc_cache_lru_test.erl b/src/ddoc_cache/test/ddoc_cache_lru_test.erl
index 245511563..60605b9a5 100644
--- a/src/ddoc_cache/test/ddoc_cache_lru_test.erl
+++ b/src/ddoc_cache/test/ddoc_cache_lru_test.erl
@@ -28,7 +28,7 @@ recover(<<"pause", _/binary>>) ->
{ok, paused};
recover(<<"big", _/binary>>) ->
- {ok, [random:uniform() || _ <- lists:seq(1, 8192)]};
+ {ok, [couch_rand:uniform() || _ <- lists:seq(1, 8192)]};
recover(DbName) ->
{ok, DbName}.