couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [couchdb] branch optimize-ddoc-cache updated: ss - test suite
Date Tue, 20 Jun 2017 14:05:30 GMT
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch optimize-ddoc-cache
in repository https://gitbox.apache.org/repos/asf/couchdb.git


The following commit(s) were added to refs/heads/optimize-ddoc-cache by this push:
     new 3c4a95f  ss - test suite
3c4a95f is described below

commit 3c4a95fe55cf095e986a54dec6cb85c355e3dcd6
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
AuthorDate: Tue Jun 20 09:05:17 2017 -0500

    ss - test suite
---
 src/ddoc_cache/src/ddoc_cache_lru.erl | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/ddoc_cache/src/ddoc_cache_lru.erl b/src/ddoc_cache/src/ddoc_cache_lru.erl
index fecf780..2dd680c 100644
--- a/src/ddoc_cache/src/ddoc_cache_lru.erl
+++ b/src/ddoc_cache/src/ddoc_cache_lru.erl
@@ -50,6 +50,13 @@
 }).
 
 
+-ifdef(TEST).
+-define(EVICTED(DbName, DDocIds), ddoc_cache_ev:evicted(DbName, DDocIds)).
+-else.
+-define(EVICTED(DbName, DDocIds), ignore).
+-endif.
+
+
 start_link() ->
     gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
 
@@ -200,7 +207,7 @@ handle_cast({do_evict, DbName}, St) ->
         not_found ->
             ok
     end,
-    ddoc_cache_ev:evicted(DbName, all),
+    ?EVICTED(DbName, all),
     {noreply, St};
 
 handle_cast({do_evict, DbName, DDocIdList}, St) ->
@@ -229,7 +236,7 @@ handle_cast({do_evict, DbName, DDocIdList}, St) ->
         not_found ->
             ok
     end,
-    ddoc_cache_ev:evicted(DbName, DDocIdList),
+    ?EVICTED(DbName, DDocIdList),
     {noreply, St};
 
 handle_cast(Msg, St) ->

-- 
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <commits@couchdb.apache.org>'].

Mime
View raw message