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
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.
Revision history for this message
Graham Binns (gmb) wrote :

Hi Julian,

This branch is good to land, but I've one question:

> === modified file 'lib/lp/soyuz/tests/test_buildqueue.py'
> --- lib/lp/soyuz/tests/test_buildqueue.py 2010-02-25 16:34:13 +0000
> +++ lib/lp/soyuz/tests/test_buildqueue.py 2010-03-08 16:50:38 +0000
> @@ -96,8 +96,12 @@
> queue_entry.lastscore)
>
>
> -def check_mintime_to_builder(test, bq, min_time):
> +def check_mintime_to_builder(
> + test, bq, min_time, time_stamp=datetime.utcnow()):

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."""
> + # Monkey-patch BuildQueueSet._now() so it returns a constant time stamp
> + # that's not too far in the future. This avoids spurious test failures.
> + monkey_patch_the_now_property(bq)
> delay = bq._estimateTimeToNextBuilder()
> test.assertTrue(
> delay <= min_time,

Otherwise, r=me.

review: Approve (code)
Revision history for this message
Stuart Bishop (stub) wrote :

DB related stuff is all good. No need for me to review this really.

review: Approve (db)
Revision history for this message
Julian Edwards (julian-edwards) wrote :

The diff is crack, I branched off devel by mistake and this is targeted to db-devel :(

I've pushed up a new branch that was branched from db-devel. gmb already approved the tiny diff in IRC.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: