Fix flaky testPreDepsHooks test

Our Windows CI machine may take longer than 10s to process hooks
resulting in an extra block of information being printed. This change
updates the affected test to handle both fast and slow cases.

R=gavinmak@google.com

Fixed: 1352364
Change-Id: I62edbe49c0efc16cfed2bc218220840120c81c0a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3867544
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
changes/44/3867544/2
Josip Sokcevic 3 years ago committed by LUCI CQ
parent 228fedfaad
commit 5084800dc3

@ -378,7 +378,9 @@ class GClientSmokeGIT(gclient_smoketest_base.GClientSmokeBase):
'--revision', 'src@' + self.githash('repo_5', 2)],
expectation)
self.assertEqual('Cloning into ', out[0][1][:13])
self.assertEqual(2, len(out[1]), out[1])
# parseGClient may produce hook slowness warning, so we expect either 2 or 3
# blocks.
self.assertIn(len(out[1]), [2, 3], out[1])
self.assertEqual('pre-deps hook', out[1][1])
tree = self.mangle_git_tree(('repo_5@2', 'src'),
('repo_1@2', 'src/repo1'),

Loading…
Cancel
Save