Skip to content

Commit

Permalink
Fixup AndroidIntegrationTest broken by Distribution refactor.
Browse files Browse the repository at this point in the history
This base test was using the old pre-DistributionLocator api.

Testing Done:
Failed with a missing symbol before, passes now:
```
$ ./pants test tests/python/pants_test/android/tasks:unpack_libraries_integration
```

CI went green here:
  https://travis-ci.org/pantsbuild/pants/builds/80271642

Bugs closed: 1841, 2189

Reviewed at https://rbcommons.com/s/twitter/r/2811/
  • Loading branch information
jsirois committed Sep 14, 2015
1 parent 164c64f commit 0f642ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions tests/python/pants_test/android/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ python_tests(
dependencies = [
'src/python/pants/java/distribution:distribution',
'tests/python/pants_test:int-test',
'tests/python/pants_test/subsystem:subsystem_utils',
],
)

Expand Down
6 changes: 4 additions & 2 deletions tests/python/pants_test/android/android_integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@

import os

from pants.java.distribution.distribution import Distribution
from pants.java.distribution.distribution import Distribution, DistributionLocator
from pants_test.pants_run_integration_test import PantsRunIntegrationTest
from pants_test.subsystem.subsystem_util import subsystem_instance


class AndroidIntegrationTest(PantsRunIntegrationTest):
Expand Down Expand Up @@ -37,7 +38,8 @@ def requirements(cls, tools):
else:
return False
try:
Distribution.cached(minimum_version=cls.JAVA_MIN, maximum_version=cls.JAVA_MAX)
with subsystem_instance(DistributionLocator) as locator:
locator.cached(minimum_version=cls.JAVA_MIN, maximum_version=cls.JAVA_MAX)
except Distribution.Error:
return False
return True

0 comments on commit 0f642ac

Please sign in to comment.