darcs

Patch 334 Test for issue1599: expire unused caches

Title Test for issue1599: expire unused caches
Superseder Nosy List abuiles, kowey
Related Issues
Status accepted Assigned To
Milestone

Created on 2010-08-07.21:11:53 by abuiles, last changed 2011-05-10.19:35:56 by darcswatch. Tracked on DarcsWatch.

Files
File name Status Uploaded Type Edit Remove
test-for-issue1599_-expire-unused-caches.dpatch abuiles, 2010-08-07.21:11:53 text/x-darcs-patch
unnamed abuiles, 2010-08-07.21:11:53
See mailing list archives for discussion on individual patches.
Messages
msg12041 (view) Author: abuiles Date: 2010-08-07.21:11:53
1 patch for repository http://darcs.net:

Sat Aug  7 16:11:43 COT 2010  builes.adolfo@googlemail.com
  * Test for issue1599: expire unused caches
Attachments
msg12051 (view) Author: darcswatch Date: 2010-08-08.12:42:23
This patch bundle (with 1 patches) was just applied to the repository http://darcs.net/.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-15288837a220d3d95bbcbf32abf4c39db1613a12
msg12059 (view) Author: kowey Date: 2010-08-08.13:47:46
OK, this seems like a fairly straightforward way to test, but where does
this dummyRepo come from?

On Sat, Aug 07, 2010 at 21:11:53 +0000, Adolfo Builes wrote:
> +serve_http # sets baseurl
> +darcs get --lazy $baseurl/R S
> +rm S/_darcs/prefs/sources
> +echo "repo:http://10.1.2.3/S" >> S/_darcs/prefs/sources

Do we assume that http://10.1.2.3/S is an unreachable repo here?

It may be reasonable, but I wonder if we have a way to skew things so
that so it's even less likely to be something reachable.  Like is there
some sort of canonical "bad" IP address?

> +echo "repo:$baseurl/dummyRepo" >> S/_darcs/prefs/sources
> +echo "repo:~/test1599/S" >> S/_darcs/prefs/sources
> +echo "repo:$baseurl/R" >> S/_darcs/prefs/sources
> +darcs changes --repo S --debug --verbose --no-cache 2>&1 | tee log
> +c=`grep -c "URL.waitUrl http://10.1.2.3/S" log`
> +c1=`grep -c "URL.waitUrl $baseurl/dummyRepo" log`
> +c2=`grep -c "~/test1599/S" log`
> +[ $c  -eq 1 ] && [ $c1 -eq 2 ] && [ $c2 -eq 1 ]

Testing here is based on word counts, which seems fine.

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
For a faster response, please try +44 (0)1273 64 2905.
msg12060 (view) Author: kowey Date: 2010-08-08.14:01:43
Oh, somebody already pushed it.  Sorry, reviewer! Didn't mean to step on 
your toes.
msg12061 (view) Author: abuiles Date: 2010-08-08.14:49:43
Hi

> OK, this seems like a fairly straightforward way to test, but where does
> this dummyRepo come from?

Is just to test the case of  a moved/deleted repo, the host is
reachable but there is nothing there.


>
> Do we assume that http://10.1.2.3/S is an unreachable repo here?
>
Yes, and that I will time out. ( I know someone could have a repo in
that address, but I'm going to quote you here: "we don't care; it's
just such a specific case that it won't really matter in practice" )
msg14174 (view) Author: darcswatch Date: 2011-05-10.19:35:56
This patch bundle (with 1 patches) was just applied to the repository http://darcs.net/reviewed.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_reviewed.html#bundle-15288837a220d3d95bbcbf32abf4c39db1613a12
History
Date User Action Args
2010-08-07 21:11:53abuilescreate
2010-08-07 21:13:03darcswatchsetdarcswatchurl: http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-15288837a220d3d95bbcbf32abf4c39db1613a12
2010-08-08 12:42:23darcswatchsetstatus: needs-review -> accepted
messages: + msg12051
2010-08-08 13:47:46koweysetstatus: accepted -> in-discussion
nosy: + kowey
messages: + msg12059
2010-08-08 14:01:43koweysetstatus: in-discussion -> accepted
messages: + msg12060
2010-08-08 14:49:43abuilessetstatus: accepted -> in-discussion
messages: + msg12061
2010-08-08 14:52:21koweysetstatus: in-discussion -> accepted
2011-05-10 19:35:56darcswatchsetmessages: + msg14174