Merge lp://staging/~gary/juju-gui/ci2 into lp://staging/juju-gui/experimental

Proposed by Gary Poster
Status: Merged
Merged at revision: 478
Proposed branch: lp://staging/~gary/juju-gui/ci2
Merge into: lp://staging/juju-gui/experimental
Diff against target: 90 lines (+27/-15)
2 files modified
lib/deploy_charm_for_testing.py (+13/-6)
test/test_charm_running.py (+14/-9)
To merge this branch: bzr merge lp://staging/~gary/juju-gui/ci2
Reviewer Review Type Date Requested Status
Juju GUI Hackers Pending
Review via email: mp+156210@code.staging.launchpad.net

Description of the change

Tweak CI tests

Retry unit tests more, and only specify an instance type in canonistack.

https://codereview.appspot.com/8083044/

To post a comment you must log in.
Revision history for this message
Gary Poster (gary) wrote :
Download full text (4.9 KiB)

Reviewers: mp+156210_code.launchpad.net,

Message:
Please take a look.

Description:
Tweak CI tests

Retry unit tests more, and only specify an instance type in canonistack.

https://code.launchpad.net/~gary/juju-gui/ci2/+merge/156210

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/8083044/

Affected files:
   A [revision details]
   M lib/deploy_charm_for_testing.py
   M test/test_charm_running.py

Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>

Index: lib/deploy_charm_for_testing.py
=== modified file 'lib/deploy_charm_for_testing.py'
--- lib/deploy_charm_for_testing.py 2013-03-28 15:40:14 +0000
+++ lib/deploy_charm_for_testing.py 2013-03-29 18:16:49 +0000
@@ -26,6 +26,7 @@
          print(err.output)
          raise

+
  # We found that the juju status call fails intermittently in
  # canonistack. This works around that particular fragility.
  @retry(subprocess.CalledProcessError, tries=3)
@@ -99,13 +100,21 @@
          wait_for_machine=wait_for_machine):
      """Deploy the Juju GUI service and wait for it to become available."""
      args = options()
+ # Get the IP that we should associate with the charm. This is only
used
+ # by Canonistack, and is effectively our flag for that environment.
+ instance_ip = os.environ.get("JUJU_INSTANCE_IP")
      try:
          print('Bootstrapping...')
- juju('bootstrap --environment juju-gui-testing '
- '--constraints instance-type=m1.small')
+ if instance_ip:
+ # We are deploying in Canonistack.
              # The default m1.tiny was so small that the improv server would
- # sometimes fail to start. The m1.medium is more difficult to
obtain
- # on canonistack than m1.small, so m1.small seems to be "just
right"
+ # sometimes fail to start. The m1.medium is more difficult to
+ # obtain on canonistack than m1.small, so m1.small seems to be
+ # "just right."
+ juju('bootstrap --environment juju-gui-testing '
+ '--constraints instance-type=m1.small')
+ else:
+ juju('bootstrap --environment juju-gui-testing')
          print('Deploying service...')
          options = {'serve-tests': True, 'staging': True, 'secure': False,
                     'juju-gui-source': args.origin}
@@ -116,8 +125,6 @@

          print('Waiting for service to start...')
          wait_for_machine()
- # Fetches the instance ID from the testing instances to apply an
IP to
- instance_ip = os.environ.get("JUJU_INSTANCE_IP")
          if instance_ip:
              print('Assigning JUJU_INSTANCE_IP %s' % instance_ip)
              instance_id = subprocess.check_output(

Index: test/test_charm_running.py
=== modified file 'test/test_charm_running.py'
--- test/test_charm_running.py 2013-03-27 22:52:28 +0000
+++ test/test_charm_running.py 2013-0...

Read more...

Revision history for this message
Madison Scott-Clary (makyo) wrote :

LGTM - thanks for the branch. Unfortunate issue to have to work around
:/

https://codereview.appspot.com/8083044/

Revision history for this message
Richard Harding (rharding) wrote :

LGTM

https://codereview.appspot.com/8083044/diff/1/test/test_charm_running.py
File test/test_charm_running.py (right):

https://codereview.appspot.com/8083044/diff/1/test/test_charm_running.py#newcode52
test/test_charm_running.py:52: timeout=90)
I can't tell for sure from the diff but does this add trailing spaces?

https://codereview.appspot.com/8083044/

lp://staging/~gary/juju-gui/ci2 updated
479. By Gary Poster

merge trunk to try and resolve submission issues

Revision history for this message
Gary Poster (gary) wrote :

*** Submitted:

Tweak CI tests

Retry unit tests more, and only specify an instance type in canonistack.

R=matthew.scott, rharding
CC=
https://codereview.appspot.com/8083044

https://codereview.appspot.com/8083044/diff/1/test/test_charm_running.py
File test/test_charm_running.py (right):

https://codereview.appspot.com/8083044/diff/1/test/test_charm_running.py#newcode52
test/test_charm_running.py:52: timeout=90)
On 2013/03/29 20:11:52, rharding wrote:
> I can't tell for sure from the diff but does this add trailing spaces?
No, doublechecked.

https://codereview.appspot.com/8083044/

Revision history for this message
Gary Poster (gary) wrote :

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