You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by wf...@apache.org on 2014/01/14 22:35:02 UTC
git commit: Fix build break caused by a584410.
Updated Branches:
refs/heads/master a584410c4 -> 730cff698
Fix build break caused by a584410.
Testing Done:
./pants src/test/python:all
Reviewed at https://reviews.apache.org/r/16868/
Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/730cff69
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/730cff69
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/730cff69
Branch: refs/heads/master
Commit: 730cff698a7f9cc11321d4c93c9aa709d78b164b
Parents: a584410
Author: Bill Farner <wf...@apache.org>
Authored: Tue Jan 14 13:34:48 2014 -0800
Committer: Bill Farner <wf...@apache.org>
Committed: Tue Jan 14 13:34:48 2014 -0800
----------------------------------------------------------------------
src/test/python/apache/aurora/client/commands/test_diff.py | 9 +++------
.../python/apache/aurora/client/commands/test_update.py | 9 +++------
2 files changed, 6 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/730cff69/src/test/python/apache/aurora/client/commands/test_diff.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/test_diff.py b/src/test/python/apache/aurora/client/commands/test_diff.py
index 82c3cc6..a042153 100644
--- a/src/test/python/apache/aurora/client/commands/test_diff.py
+++ b/src/test/python/apache/aurora/client/commands/test_diff.py
@@ -4,6 +4,7 @@ from apache.aurora.client.commands.core import diff
from apache.aurora.client.commands.util import AuroraClientCommandTest
from twitter.common.contextutil import temporary_file
+from gen.apache.aurora.constants import ACTIVE_STATES
from gen.apache.aurora.ttypes import (
AssignedTask,
ExecutorConfig,
@@ -112,9 +113,7 @@ class TestDiffCommand(AuroraClientCommandTest):
# Diff should get the task status, populate a config, and run diff.
mock_scheduler.getTasksStatus.assert_called_with(
TaskQuery(jobName='hello', environment='test', owner=Identity(role='mchucarroll'),
- statuses=set([ScheduleStatus.PENDING, ScheduleStatus.STARTING,
- ScheduleStatus.RUNNING, ScheduleStatus.KILLING, ScheduleStatus.ASSIGNED,
- ScheduleStatus.RESTARTING, ScheduleStatus.PREEMPTING])))
+ statuses=ACTIVE_STATES))
assert mock_scheduler.populateJobConfig.call_count == 1
assert isinstance(mock_scheduler.populateJobConfig.call_args[0][0], JobConfiguration)
assert (mock_scheduler.populateJobConfig.call_args[0][0].key ==
@@ -176,8 +175,6 @@ class TestDiffCommand(AuroraClientCommandTest):
# but since it fails, we shouldn't call populateJobConfig or subprocess.
mock_scheduler.getTasksStatus.assert_called_with(
TaskQuery(jobName='hello', environment='test', owner=Identity(role='mchucarroll'),
- statuses=set([ScheduleStatus.PENDING, ScheduleStatus.STARTING,
- ScheduleStatus.RUNNING, ScheduleStatus.KILLING, ScheduleStatus.ASSIGNED,
- ScheduleStatus.RESTARTING, ScheduleStatus.PREEMPTING])))
+ statuses=ACTIVE_STATES))
assert mock_scheduler.populateJobConfig.call_count == 0
assert subprocess_patch.call_count == 0
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/730cff69/src/test/python/apache/aurora/client/commands/test_update.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/test_update.py b/src/test/python/apache/aurora/client/commands/test_update.py
index 69da111..de6039b 100644
--- a/src/test/python/apache/aurora/client/commands/test_update.py
+++ b/src/test/python/apache/aurora/client/commands/test_update.py
@@ -13,6 +13,7 @@ from apache.aurora.client.hooks.hooked_api import HookedAuroraClientAPI
from apache.aurora.config import AuroraConfig
from twitter.common.contextutil import temporary_file
+from gen.apache.aurora.constants import ACTIVE_STATES
from gen.apache.aurora.ttypes import (
AcquireLockResult,
AddInstancesConfig,
@@ -34,10 +35,6 @@ from mock import Mock, patch
class TestUpdateCommand(AuroraClientCommandTest):
- QUERY_STATUSES = frozenset([ScheduleStatus.PENDING, ScheduleStatus.STARTING,
- ScheduleStatus.RUNNING, ScheduleStatus.KILLING, ScheduleStatus.ASSIGNED,
- ScheduleStatus.RESTARTING, ScheduleStatus.PREEMPTING])
-
@classmethod
def setup_mock_options(cls):
"""set up to get a mock options object."""
@@ -250,7 +247,7 @@ class TestUpdateCommand(AuroraClientCommandTest):
TaskQuery(taskIds=None, jobName='hello', environment='test',
instanceIds=frozenset([16, 17, 18, 19, 15]),
owner=Identity(role=u'mchucarroll', user=None),
- statuses=cls.QUERY_STATUSES),
+ statuses=ACTIVE_STATES),
'foo')
@classmethod
@@ -266,7 +263,7 @@ class TestUpdateCommand(AuroraClientCommandTest):
status_calls = api.getTasksStatus.call_args_list
assert status_calls[0][0][0] == TaskQuery(taskIds=None, jobName='hello', environment='test',
owner=Identity(role=u'mchucarroll', user=None),
- statuses=cls.QUERY_STATUSES)
+ statuses=ACTIVE_STATES)
for status_call in status_calls[1:]:
status_call[0][0] == TaskQuery(taskIds=None, jobName='hello', environment='test',
owner=Identity(role='mchucarroll', user=None), statuses=set([ScheduleStatus.RUNNING]))