Merge lp:~james-w/udd/fix-auto-retry into lp:udd
| Status: | Merged |
|---|---|
| Approved by: | Vincent Ladeuil on 2012-07-04 |
| Approved revision: | 605 |
| Merged at revision: | 604 |
| Proposed branch: | lp:~james-w/udd/fix-auto-retry |
| Merge into: | lp:udd |
| Diff against target: |
108 lines (+44/-8) 2 files modified
udd/icommon.py (+7/-6) udd/tests/test_status_database.py (+37/-2) |
| To merge this branch: | bzr merge lp:~james-w/udd/fix-auto-retry |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Vincent Ladeuil | 2012-07-04 | Approve on 2012-07-04 | |
|
Review via email:
|
|||
Commit Message
Fix auto retry to only retry things that are marked to be auto retried.
- 605. By James Westby on 2012-07-04
-
Change the variable name to make the purpose clearer.
| Jonathan Lange (jml) wrote : | # |
On 4 July 2012 15:37, James Westby <email address hidden> wrote:
> James Westby has proposed merging lp:~james-w/udd/fix-auto-retry into lp:udd.
>
> Requested reviews:
> Ubuntu Distributed Development Developers (udd)
>
> For more details, see:
> https:/
>
>
> --
> https:/
> Your team Ubuntu Distributed Development Developers is requested to review the proposed merge of lp:~james-w/udd/fix-auto-retry into lp:udd.
>
> === modified file 'udd/icommon.py'
> --- udd/icommon.py 2012-07-04 11:27:18 +0000
> +++ udd/icommon.py 2012-07-04 14:36:22 +0000
> @@ -768,7 +768,7 @@
> return sig
>
> def _known_
> - return c.execute(
> + return c.execute(
>
Since this caught us out once, it's probably a good idea to add a
docstring to this method explaining its return type so we aren't
caught out again.
> === modified file 'udd/tests/
> --- udd/tests/
> +++ udd/tests/
> @@ -112,7 +112,7 @@
> class TestRetry(
>
> def test_known_
> - self.assertEqua
> + self.assertEqua
>
> def test_known_
> sig = u'whatever'
> @@ -123,12 +123,47 @@
> self.db.
> self.assertEqua
>
> + def test_attempt_
> + info = icommon.
> + info.signature = u'aaaa'
...
Good tests, thanks!
If the signature u'aaaa' is special at all, then it should become a
constant or something. If udd already depends on testtools or similar
then it should probably use a factory method.
Thanks,
jml
| James Westby (james-w) wrote : | # |
On Thu, 05 Jul 2012 09:04:24 -0000, Jonathan Lange <email address hidden> wrote:
> Since this caught us out once, it's probably a good idea to add a
> docstring to this method explaining its return type so we aren't
> caught out again.
I've added a reference to the public version of the method which is
documented.
> Good tests, thanks!
>
> If the signature u'aaaa' is special at all, then it should become a
> constant or something. If udd already depends on testtools or similar
> then it should probably use a factory method.
It's not special, and the code doesn't currently depend on testtools.
Thanks,
James
| Vincent Ladeuil (vila) wrote : | # |
> It's not special,
/me nods
> and the code doesn't currently depend on testtools.
Well, the tests use bzrlib.tests which use testtools, so you can use testtools features if/when needed.
| James Westby (james-w) wrote : | # |
On Tue, 10 Jul 2012 12:22:24 -0000, Vincent Ladeuil <email address hidden> wrote:
> Well, the tests use bzrlib.tests which use testtools, so you can use testtools features if/when needed.
Ah, good point.
Thanks,
James

Shame I didn't write those tests in the first place :-/