Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Flaky CI - Mimic #4454

Merged
merged 3 commits into from
May 1, 2023
Merged
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
17 changes: 5 additions & 12 deletions tests/cli/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,10 @@ def recursive_ls(path):


def data_hash(uuid, worksheet=None):
"""Temporarily download bundle contents.
Return a hash of those contents.
"""
Temporarily download bundle contents.
Return a hash of those contents.
"""
_run_command([cl, 'wait', uuid])
path = temp_path(uuid)
if not os.path.exists(path):
# Download the bundle to that path.
Expand All @@ -316,10 +316,8 @@ def data_hash(uuid, worksheet=None):
sha1 = hashlib.sha1()
files = recursive_ls(path)[1]
for f in files:
try:
sha1.update(open(f, 'r').read().encode())
except Exception as e:
raise Exception("file name: {}. exception: {}".format(f, e))
sha1.update(open(f, 'r').read().encode())
shutil.rmtree(path)
return sha1.hexdigest()


Expand Down Expand Up @@ -2388,11 +2386,6 @@ def test_write(ctx):
check_equals(str(['write\tmessage\thello world']), get_info(uuid, 'actions'))


"""
This we'll have ot think about how to migrate...
"""


@TestModule.register('mimic')
def test_mimic(ctx):
simple_name = random_name()
Expand Down