[
https://issues.apache.org/jira/browse/BEAM-6569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16759848#comment-16759848
]
Robbe commented on BEAM-6569:
-----------------------------
The problem here was not a flaky test, but that the test was included twice in
the test suite (see comments on
[#7691|https://github.com/apache/beam/pull/7691])
The same mocked object is used twice, which resulted in the iterator being
exhausted during the second test.
In [the
logs|https://builds.apache.org/job/beam_PreCommit_Python_Commit/4034/console]
of one of the runs that flagged this test as flaky, we can see that the test
passed the first time, and failed the second time.
{noformat}
12:54:06 test_rename (apache_beam.io.gcp.gcsio_test.TestGCSIO) ... ok
...
12:54:06 test_rename (apache_beam.io.gcp.gcsio_test.TestGCSIO) ... ERROR
{noformat}
> GCS IO tests are very flaky under Python 3.5
> --------------------------------------------
>
> Key: BEAM-6569
> URL: https://issues.apache.org/jira/browse/BEAM-6569
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-py-core
> Reporter: Valentyn Tymofieiev
> Assignee: Robbe
> Priority: Major
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> cc: [~Juta] [~markflyhigh] [~RobbeSneyders]
> Example:
> {noformat}
> apache_beam.io.gcp.gcsio_test.TestGCSIO.test_rename (from nosetests)
> Traceback (most recent call last):
> File
> "/home/jenkins/jenkins-slave/workspace/beam_PreCommit_Python_Commit@2/src/sdks/python/apache_beam/utils/retry.py",
> line 184, in wrapper
> return fun(*args, **kwargs)
> File
> "/home/jenkins/jenkins-slave/workspace/beam_PreCommit_Python_Commit@2/src/sdks/python/apache_beam/io/gcp/gcsio.py",
> line 274, in copy
> response.totalBytesRewritten, response.objectSize, src, dest)
> File "/usr/lib/python3.5/logging/__init__.py", line 1848, in debug
> root.debug(msg, *args, **kwargs)
> File "/usr/lib/python3.5/logging/__init__.py", line 1267, in debug
> self._log(DEBUG, msg, args, **kwargs)
> File "/usr/lib/python3.5/logging/__init__.py", line 1414, in _log
> exc_info, func, extra, sinfo)
> File "/usr/lib/python3.5/logging/__init__.py", line 1384, in makeRecord
> sinfo)
> File "/usr/lib/python3.5/logging/__init__.py", line 248, in __init__
> ct = time.time()
> File
> "/home/jenkins/jenkins-slave/workspace/beam_PreCommit_Python_Commit@2/src/sdks/python/target/.tox/py3-gcp/lib/python3.5/site-packages/mock/mock.py",
> line 1062, in __call__
> return _mock_self._mock_call(*args, **kwargs)
> File
> "/home/jenkins/jenkins-slave/workspace/beam_PreCommit_Python_Commit@2/src/sdks/python/target/.tox/py3-gcp/lib/python3.5/site-packages/mock/mock.py",
> line 1121, in _mock_call
> result = next(effect)
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)