diff options
author | Nick Vatamaniuc <vatamane@apache.org> | 2017-10-03 02:14:22 -0400 |
---|---|---|
committer | Nick Vatamaniuc <nickva@users.noreply.github.com> | 2017-10-05 11:40:41 -0400 |
commit | 75984da4b22003d0e46a9fe1001978d999387636 (patch) | |
tree | f2c797dd5771ce468abd931d6bfe9d04c51ac2c0 /src/ddoc_cache | |
parent | 4963f66653e29d913eba4811b1b88d931877193f (diff) | |
download | couchdb-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.erl | 2 |
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}. |