Merge lp://staging/~julian-edwards/launchpad/bug-517098 into lp://staging/launchpad/db-devel
Proposed by
Julian Edwards
Status: | Merged |
---|---|
Approved by: | Graham Binns |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp://staging/~julian-edwards/launchpad/bug-517098 |
Merge into: | lp://staging/launchpad/db-devel |
Diff against target: |
25 lines (+7/-1) 2 files modified
cronscripts/update-pkgcache.py (+1/-1) database/schema/security.cfg (+6/-0) |
To merge this branch: | bzr merge lp://staging/~julian-edwards/launchpad/bug-517098 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Stuart Bishop (community) | db | Approve | |
Graham Binns (community) | code | Approve | |
Review via email: mp+20908@code.staging.launchpad.net |
Description of the change
Give update-pkg-cache.py its own database user for stub.
PackageCacheUpdater doesn't have any tests so I'll Q/A this on dogfood.
To post a comment you must log in.
Hi Julian,
This branch is good to land, but I've one question:
> === modified file 'lib/lp/ soyuz/tests/ test_buildqueue .py' soyuz/tests/ test_buildqueue .py 2010-02-25 16:34:13 +0000 soyuz/tests/ test_buildqueue .py 2010-03-08 16:50:38 +0000 lastscore) to_builder( test, bq, min_time): to_builder( datetime. utcnow( )):
> --- lib/lp/
> +++ lib/lp/
> @@ -96,8 +96,12 @@
> queue_entry.
>
>
> -def check_mintime_
> +def check_mintime_
> + test, bq, min_time, time_stamp=
Isn't this default a bit fragile? It would be better to declare the
default as None and then have
if time_stamp is None:
time_stamp = datetime.utcnow()
in the test, wouldn't it?
> """Test the estimated time until a builder becomes available.""" _now() so it returns a constant time stamp patch_the_ now_property( bq) eToNextBuilder( )
> + # Monkey-patch BuildQueueSet.
> + # that's not too far in the future. This avoids spurious test failures.
> + monkey_
> delay = bq._estimateTim
> test.assertTrue(
> delay <= min_time,
Otherwise, r=me.