Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1852,7 +1852,7 @@ class BeamModulePlugin implements Plugin<Project> {
def distTarBall = "${pythonRootDir}/build/apache-beam.tar.gz"
project.exec {
executable 'sh'
args '-c', ". ${project.ext.envdir}/bin/activate && pip install --retries 10 ${distTarBall}[gcp,test]"
args '-c', ". ${project.ext.envdir}/bin/activate && pip install --retries 10 ${distTarBall}[gcp,test,aws]"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions sdks/python/apache_beam/io/aws/s3io_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,16 @@ def test_size(self):
self.aws.delete(file_name)

def test_last_updated(self):
self.skipTest('BEAM-9532 fix issue with s3 last updated')
file_name = self.TEST_DATA_PATH + 'dummy_file'
file_size = 1234

self._insert_random_file(self.client, file_name, file_size)
self.assertTrue(self.aws.exists(file_name))

tolerance = 5 * 60 # 5 mins
low_bound, high_bound = time.time() - tolerance, time.time() + tolerance
result = self.aws.last_updated(file_name)
self.assertTrue(low_bound <= result <= high_bound)
self.assertAlmostEqual(result, time.time(), delta=tolerance)

# Clean up
self.aws.delete(file_name)
Expand Down
8 changes: 4 additions & 4 deletions sdks/python/test-suites/tox/py2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ lint.dependsOn lintPy27
toxTask "lintPy27_3", "py27-lint3"
lint.dependsOn lintPy27_3

toxTask "testPy2Gcp", "py27-gcp"
test.dependsOn testPy2Gcp
toxTask "testPy2Cloud", "py27-cloud"
test.dependsOn testPy2Cloud

toxTask "testPython2", "py27"
test.dependsOn testPython2
Expand All @@ -42,11 +42,11 @@ toxTask "testPy2Cython", "py27-cython"
test.dependsOn testPy2Cython

// TODO(BEAM-8954): Remove this once tox uses isolated builds.
testPy2Cython.mustRunAfter testPython2, testPy2Gcp
testPy2Cython.mustRunAfter testPython2, testPy2Cloud

toxTask "cover", "cover"

task preCommitPy2() {
dependsOn "testPy2Cython"
dependsOn "testPy2Gcp"
dependsOn "testPy2Cloud"
}
8 changes: 4 additions & 4 deletions sdks/python/test-suites/tox/py35/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ pythonVersion = '3.5'
toxTask "testPython35", "py35"
test.dependsOn testPython35

toxTask "testPy35Gcp", "py35-gcp"
test.dependsOn testPy35Gcp
toxTask "testPy35Cloud", "py35-cloud"
test.dependsOn testPy35Cloud

toxTask "testPy35Cython", "py35-cython"
test.dependsOn testPy35Cython

// TODO(BEAM-8954): Remove this once tox uses isolated builds.
testPy35Cython.mustRunAfter testPython35, testPy35Gcp
testPy35Cython.mustRunAfter testPython35, testPy35Cloud

task preCommitPy35() {
dependsOn "testPy35Gcp"
dependsOn "testPy35Cloud"
dependsOn "testPy35Cython"
}
8 changes: 4 additions & 4 deletions sdks/python/test-suites/tox/py36/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ pythonVersion = '3.6'
toxTask "testPython36", "py36"
test.dependsOn testPython36

toxTask "testPy36Gcp", "py36-gcp"
test.dependsOn testPy36Gcp
toxTask "testPy36Cloud", "py36-cloud"
test.dependsOn testPy36Cloud

toxTask "testPy36Cython", "py36-cython"
test.dependsOn testPy36Cython

// TODO(BEAM-8954): Remove this once tox uses isolated builds.
testPy36Cython.mustRunAfter testPython36, testPy36Gcp
testPy36Cython.mustRunAfter testPython36, testPy36Cloud

task preCommitPy36() {
dependsOn "testPy36Gcp"
dependsOn "testPy36Cloud"
dependsOn "testPy36Cython"
}
8 changes: 4 additions & 4 deletions sdks/python/test-suites/tox/py37/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ check.dependsOn formatter
toxTask "testPython37", "py37"
test.dependsOn testPython37

toxTask "testPy37Gcp", "py37-gcp"
test.dependsOn testPy37Gcp
toxTask "testPy37Cloud", "py37-cloud"
test.dependsOn testPy37Cloud

toxTask "testPy37Cython", "py37-cython"
test.dependsOn testPy37Cython

// TODO(BEAM-8954): Remove this once tox uses isolated builds.
testPy37Cython.mustRunAfter testPython37, testPy37Gcp
testPy37Cython.mustRunAfter testPython37, testPy37Cloud

task preCommitPy37() {
dependsOn "testPy37Gcp"
dependsOn "testPy37Cloud"
dependsOn "testPy37Cython"
}
21 changes: 8 additions & 13 deletions sdks/python/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ commands =
python apache_beam/examples/complete/autocomplete_test.py
{toxinidir}/scripts/run_pytest.sh {envname} "{posargs}"

[testenv:py27-gcp]
extras = test,gcp
[testenv:py27-cloud]
extras = test,gcp,aws
commands =
python apache_beam/examples/complete/autocomplete_test.py
{toxinidir}/scripts/run_pytest.sh {envname} "{posargs}"
Expand All @@ -140,23 +140,18 @@ commands =
pytest -o junit_suite_name={envname}_v1 --junitxml=pytest_{envname}_v1.xml apache_beam/io/gcp/datastore/v1
pytest -o junit_suite_name={envname}_v1new --junitxml=pytest_{envname}_v1new.xml apache_beam/io/gcp/datastore/v1new

[testenv:py35-gcp]
extras = test,gcp
[testenv:py35-cloud]
extras = test,gcp,aws
commands =
{toxinidir}/scripts/run_pytest.sh {envname} "{posargs}"

[testenv:py36-gcp]
extras = test,gcp,interactive
[testenv:py36-cloud]
extras = test,gcp,interactive,aws
commands =
{toxinidir}/scripts/run_pytest.sh {envname} "{posargs}"

[testenv:py37-gcp]
extras = test,gcp,interactive
commands =
{toxinidir}/scripts/run_pytest.sh {envname} "{posargs}"

[testenv:py37-aws]
extras = test,aws
[testenv:py37-cloud]
extras = test,gcp,interactive,aws
commands =
{toxinidir}/scripts/run_pytest.sh {envname} "{posargs}"

Expand Down