Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Unified Diff: tests/bot_update_coverage_test.py

Issue 2382653005: Remove git lockfile flakiness on win (bot_update) (Closed)
Patch Set: Remove git lockfile flakiness on win (bot_update) Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/bot_update_coverage_test.py
diff --git a/tests/bot_update_coverage_test.py b/tests/bot_update_coverage_test.py
index f055a9ba64b64c296420cf64bfa3ca39cbda4347..9b7715e4e4afe73a06f8434818d50e1c01f17509 100755
--- a/tests/bot_update_coverage_test.py
+++ b/tests/bot_update_coverage_test.py
@@ -15,7 +15,6 @@ import unittest
sys.path.insert(0, os.path.join(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
'recipe_modules', 'bot_update', 'resources'))
-sys.platform = 'linux2' # For consistency, ya know?
import bot_update
DEFAULT_PARAMS = {
@@ -164,6 +163,7 @@ def fake_git(*args, **kwargs):
class BotUpdateUnittests(unittest.TestCase):
def setUp(self):
+ sys.platform = 'linux2' # For consistency, ya know?
self.filesystem = FakeFilesystem()
self.call = MockedCall(self.filesystem)
self.gclient = MockedGclientSync(self.filesystem)
@@ -195,6 +195,17 @@ class BotUpdateUnittests(unittest.TestCase):
bot_update.ensure_checkout(**self.params)
return self.call.records
+ def testBreakLocks(self):
+ sys.platform = 'win'
+ self.call.expect(('gclient.bat', 'sync')).returns(self.gclient)
+ bot_update.ensure_checkout(**self.params)
+ gclient_sync_cmd = None
+ for record in self.call.records:
+ args = record[0]
+ if args[0] == 'gclient.bat' and args[1] == 'sync':
+ gclient_sync_cmd = args
+ self.assertTrue('--break_repo_locks' in gclient_sync_cmd)
+
if __name__ == '__main__':
unittest.main()

Powered by Google App Engine
This is Rietveld 408576698