OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2014 The LUCI Authors. All rights reserved. | 2 # Copyright 2014 The LUCI Authors. All rights reserved. |
3 # Use of this source code is governed under the Apache License, Version 2.0 | 3 # Use of this source code is governed under the Apache License, Version 2.0 |
4 # that can be found in the LICENSE file. | 4 # that can be found in the LICENSE file. |
5 | 5 |
6 """Integration test for the Swarming server, Swarming bot and Swarming client. | 6 """Integration test for the Swarming server, Swarming bot and Swarming client. |
7 | 7 |
8 It starts both a Swarming server and a Swarming bot and triggers tasks with the | 8 It starts both a Swarming server and a Swarming bot and triggers tasks with the |
9 Swarming client to ensure the system works end to end. | 9 Swarming client to ensure the system works end to end. |
10 """ | 10 """ |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 u'initial_number_items': u'0', | 507 u'initial_number_items': u'0', |
508 u'initial_size': u'0', | 508 u'initial_size': u'0', |
509 u'items_cold': [11, 199], | 509 u'items_cold': [11, 199], |
510 u'items_hot': [], | 510 u'items_hot': [], |
511 }, | 511 }, |
512 u'isolated_upload': { | 512 u'isolated_upload': { |
513 u'items_cold': [], | 513 u'items_cold': [], |
514 u'items_hot': [], | 514 u'items_hot': [], |
515 }, | 515 }, |
516 }, | 516 }, |
517 properties_hash = u'f5ce2aa67d68519e3013f40869806046a0266f1a', | 517 properties_hash = u'dc5ba0b5f15b179cb004994a6dcc1e9b728d4346', |
518 ) | 518 ) |
519 task_id = self._run_isolated( | 519 task_id = self._run_isolated( |
520 hello_world, 'idempotent_reuse', ['--idempotent'], expected_summary, {}) | 520 hello_world, 'idempotent_reuse', ['--idempotent'], expected_summary, {}) |
521 expected_summary[u'costs_usd'] = None | 521 expected_summary[u'costs_usd'] = None |
522 expected_summary.pop('performance_stats') | 522 expected_summary.pop('performance_stats') |
523 expected_summary[u'cost_saved_usd'] = 0.02 | 523 expected_summary[u'cost_saved_usd'] = 0.02 |
524 expected_summary[u'deduped_from'] = task_id[:-1] + '1' | 524 expected_summary[u'deduped_from'] = task_id[:-1] + '1' |
525 expected_summary[u'try_number'] = 0 | 525 expected_summary[u'try_number'] = 0 |
526 expected_summary[u'properties_hash'] = None | 526 expected_summary[u'properties_hash'] = None |
527 self._run_isolated( | 527 self._run_isolated( |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 if bot is not None and bot.poll() is None: | 690 if bot is not None and bot.poll() is None: |
691 bot.kill() | 691 bot.kill() |
692 bot.wait() | 692 bot.wait() |
693 finally: | 693 finally: |
694 cleanup(bot, client, servers, failed or verbose, leak) | 694 cleanup(bot, client, servers, failed or verbose, leak) |
695 return int(failed) | 695 return int(failed) |
696 | 696 |
697 | 697 |
698 if __name__ == '__main__': | 698 if __name__ == '__main__': |
699 sys.exit(main()) | 699 sys.exit(main()) |
OLD | NEW |