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

Unified Diff: appengine/swarming/local_smoke_test.py

Issue 2926713004: Add support for repeated keys in TaskRequest. (Closed)
Patch Set: rebase Created 3 years, 6 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
« no previous file with comments | « appengine/swarming/handlers_bot_test.py ('k') | appengine/swarming/message_conversion.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/local_smoke_test.py
diff --git a/appengine/swarming/local_smoke_test.py b/appengine/swarming/local_smoke_test.py
index 7d17f50abea607b7790d9e2790a012b2c40b3b66..ed857227ccb3bec98dc7abf687fe1f574b292e25 100755
--- a/appengine/swarming/local_smoke_test.py
+++ b/appengine/swarming/local_smoke_test.py
@@ -339,15 +339,29 @@ class Test(unittest.TestCase):
# A string of a letter 'A', UTF-8 BOM then UTF-16 BOM then UTF-EDBCDIC then
# invalid UTF-8 and the letter 'B'. It is double escaped so it can be passed
# down the shell.
+ #
+ # Also confirm that a bot can run with multiple keys. Assume there's at
+ # least 2 'os' values.
invalid_bytes = 'A\\xEF\\xBB\\xBF\\xFE\\xFF\\xDD\\x73\\x66\\x73\\xc3\\x28B'
args = [
+ '--dimension', 'os', self.dimensions[u'os'][0],
+ '--dimension', 'os', self.dimensions[u'os'][1],
'-T', 'non_utf8', '--',
'python', '-u', '-c', 'print(\'' + invalid_bytes + '\')',
]
+ tags = [
+ u'os:%s' % self.dimensions[u'os'][0],
+ u'os:%s' % self.dimensions[u'os'][1],
+ u'pool:default',
+ u'priority:100',
+ u'service_account:none',
+ u'user:joe@localhost',
+ ]
summary = self.gen_expected(
name=u'non_utf8',
# The string is mostly converted to 'Replacement Character'.
- outputs=[u'A\ufeff\ufffd\ufffd\ufffdsfs\ufffd(B\n'])
+ outputs=[u'A\ufeff\ufffd\ufffd\ufffdsfs\ufffd(B\n'],
+ tags=tags)
self.assertOneTask(args, summary, {})
def test_invalid_command(self):
@@ -613,8 +627,10 @@ class Test(unittest.TestCase):
u'items_hot': [],
},
},
+ # Intentionally hardcode the hash here to confirm consistency in the
+ # hashing mechanism.
properties_hash =
- u'082928de84d0a65839d227dcea2f5a947898929c77c1602b68c46d7d4588c1f5',
+ u'7340823890f29ffa64f81448517c541ebf4fc7b9ce5541bab05f3edda0cadafe',
)
task_id = self._run_isolated(
hello_world, 'idempotent_reuse', ['--idempotent'], expected_summary, {})
« no previous file with comments | « appengine/swarming/handlers_bot_test.py ('k') | appengine/swarming/message_conversion.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698