Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 11240 invoked from network); 19 Mar 2010 15:43:55 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Mar 2010 15:43:55 -0000 Received: (qmail 35090 invoked by uid 500); 19 Mar 2010 15:43:55 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 35058 invoked by uid 500); 19 Mar 2010 15:43:55 -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 35051 invoked by uid 99); 19 Mar 2010 15:43:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Mar 2010 15:43:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Mar 2010 15:43:52 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5B6A723889EA; Fri, 19 Mar 2010 15:43:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r925286 - in /couchdb/branches/0.11.x: ./ etc/default/couchdb test/etap/100-ref-counter.t Date: Fri, 19 Mar 2010 15:43:31 -0000 To: commits@couchdb.apache.org From: davisp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100319154331.5B6A723889EA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: davisp Date: Fri Mar 19 15:43:30 2010 New Revision: 925286 URL: http://svn.apache.org/viewvc?rev=925286&view=rev Log: Backport the fix for 100-ref-counter.t - 925264 Modified: couchdb/branches/0.11.x/ (props changed) couchdb/branches/0.11.x/etc/default/couchdb (props changed) couchdb/branches/0.11.x/test/etap/100-ref-counter.t Propchange: couchdb/branches/0.11.x/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Mar 19 15:43:30 2010 @@ -6,4 +6,4 @@ /couchdb/branches/list-iterator:782292-784593 /couchdb/branches/tail_header:775760-778477 /couchdb/tags/0.10.0:825400 -/couchdb/trunk:909247,910054,910696,910910-910911,911544,911559,911578,911602,911717,911837,912474,912606,912608,912615,912636,915526,915529-915530,915827,916076,916153,916518,916521,917553,918855,919193,921707,923526 +/couchdb/trunk:909247,910054,910696,910910-910911,911544,911559,911578,911602,911717,911837,912474,912606,912608,912615,912636,915526,915529-915530,915827,916076,916153,916518,916521,917553,918855,919193,921707,923526,925264 Propchange: couchdb/branches/0.11.x/etc/default/couchdb ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Mar 19 15:43:30 2010 @@ -6,5 +6,5 @@ /couchdb/branches/list-iterator/etc/default/couchdb:782292-784593 /couchdb/branches/tail_header/etc/default/couchdb:775760-778477 /couchdb/tags/0.10.0/etc/default/couchdb:825400 -/couchdb/trunk/etc/default/couchdb:909247,910054,910696,911544,911602,911717,911837,912474,912606,912608,912615,912636,915526,915529-915530,915827,916076,916153,916518,916521,917553,918855,919193,921707,923526 +/couchdb/trunk/etc/default/couchdb:909247,910054,910696,911544,911602,911717,911837,912474,912606,912608,912615,912636,915526,915529-915530,915827,916076,916153,916518,916521,917553,918855,919193,921707,923526,925264 /incubator/couchdb/trunk/etc/default/couchdb:642419-694440 Modified: couchdb/branches/0.11.x/test/etap/100-ref-counter.t URL: http://svn.apache.org/viewvc/couchdb/branches/0.11.x/test/etap/100-ref-counter.t?rev=925286&r1=925285&r2=925286&view=diff ============================================================================== --- couchdb/branches/0.11.x/test/etap/100-ref-counter.t (original) +++ couchdb/branches/0.11.x/test/etap/100-ref-counter.t Fri Mar 19 15:43:30 2010 @@ -27,17 +27,14 @@ main(_) -> loop() -> receive - {ping, From} -> - From ! pong + close -> ok end. wait() -> receive - _ -> - ok - after - 1000 -> - throw(timeout_error) + {'DOWN', _, _, _, _} -> ok + after 1000 -> + throw(timeout_error) end. test() -> @@ -94,11 +91,23 @@ test() -> "Sanity checking that the Pid was re-added." ), - ChildPid1 ! {ping, self()}, + erlang:monitor(process, ChildPid1), + ChildPid1 ! close, wait(), - etap:is( - couch_ref_counter:count(RefCtr), - 1, + + CheckFun = fun + (Iter, nil) -> + case couch_ref_counter:count(RefCtr) of + 1 -> Iter; + _ -> nil + end; + (_, Acc) -> + Acc + end, + Result = lists:foldl(CheckFun, nil, lists:seq(1, 10000)), + etap:isnt( + Result, + nil, "The referer count was decremented automatically on process exit." ),