Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E7342200CBC for ; Tue, 20 Jun 2017 16:05:35 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E5E78160BE1; Tue, 20 Jun 2017 14:05:35 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 385A5160BD3 for ; Tue, 20 Jun 2017 16:05:35 +0200 (CEST) Received: (qmail 45924 invoked by uid 500); 20 Jun 2017 14:05:34 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 45900 invoked by uid 99); 20 Jun 2017 14:05:33 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Jun 2017 14:05:33 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 2DCB781193; Tue, 20 Jun 2017 14:05:30 +0000 (UTC) Date: Tue, 20 Jun 2017 14:05:30 +0000 To: "commits@couchdb.apache.org" Subject: [couchdb] branch optimize-ddoc-cache updated: ss - test suite MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <149796753030.31919.15212461755227414488@gitbox.apache.org> From: davisp@apache.org Reply-To: "commits@couchdb.apache.org" X-Git-Host: gitbox.apache.org X-Git-Repo: couchdb X-Git-Refname: refs/heads/optimize-ddoc-cache X-Git-Reftype: branch X-Git-Oldrev: 54a048475ce5132e60fb2e043a6500ba70a89de7 X-Git-Newrev: 3c4a95fe55cf095e986a54dec6cb85c355e3dcd6 X-Git-Rev: 3c4a95fe55cf095e986a54dec6cb85c355e3dcd6 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated archived-at: Tue, 20 Jun 2017 14:05:36 -0000 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 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" '].