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 2013/12/31 22:28:05 UTC
[4/9] Refactors java and python code to the Apache namespace.
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/main/python/apache/thermos/monitoring/garbage.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/thermos/monitoring/garbage.py b/src/main/python/apache/thermos/monitoring/garbage.py
index 4ac0d3a..30364bb 100644
--- a/src/main/python/apache/thermos/monitoring/garbage.py
+++ b/src/main/python/apache/thermos/monitoring/garbage.py
@@ -7,8 +7,8 @@ import time
from twitter.common.dirutil import safe_delete, safe_rmtree, safe_bsize
from twitter.common.lang import Interface
from twitter.common.quantity import Amount, Data, Time
-from twitter.thermos.common.ckpt import CheckpointDispatcher
-from twitter.thermos.common.path import TaskPath
+from apache.thermos.common.ckpt import CheckpointDispatcher
+from apache.thermos.common.path import TaskPath
from .detector import TaskDetector
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/main/python/apache/thermos/monitoring/monitor.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/thermos/monitoring/monitor.py b/src/main/python/apache/thermos/monitoring/monitor.py
index 5af67fe..60c4e0d 100644
--- a/src/main/python/apache/thermos/monitoring/monitor.py
+++ b/src/main/python/apache/thermos/monitoring/monitor.py
@@ -15,9 +15,9 @@ import threading
from twitter.common import log
from twitter.common.recordio import ThriftRecordReader
-from twitter.thermos.common.ckpt import CheckpointDispatcher
+from apache.thermos.common.ckpt import CheckpointDispatcher
-from gen.twitter.thermos.ttypes import (
+from gen.apache.thermos.ttypes import (
ProcessState,
RunnerCkpt,
RunnerState,
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/main/python/apache/thermos/observer/BUILD
----------------------------------------------------------------------
diff --git a/src/main/python/apache/thermos/observer/BUILD b/src/main/python/apache/thermos/observer/BUILD
index 00ea9cb..8a27396 100644
--- a/src/main/python/apache/thermos/observer/BUILD
+++ b/src/main/python/apache/thermos/observer/BUILD
@@ -6,9 +6,9 @@ python_library(
dependencies = [
pants('aurora/twitterdeps/src/python/twitter/common/lang'),
pants('aurora/twitterdeps/src/python/twitter/common/log'),
- pants('src/main/python/twitter/thermos:pystachio'),
- pants('src/main/python/twitter/thermos/common:ckpt'),
- pants('src/main/python/twitter/thermos/config'),
+ pants('src/main/python/apache/thermos:pystachio'),
+ pants('src/main/python/apache/thermos/common:ckpt'),
+ pants('src/main/python/apache/thermos/config'),
]
)
@@ -21,12 +21,12 @@ python_library(
pants('aurora/twitterdeps/src/python/twitter/common/lang'),
pants('aurora/twitterdeps/src/python/twitter/common/log'),
pants('aurora/twitterdeps/src/python/twitter/common/quantity'),
- pants('src/main/python/twitter/thermos/common:path'),
- pants('src/main/python/twitter/thermos/monitoring:detector'),
- pants('src/main/python/twitter/thermos/monitoring:monitor'),
- pants('src/main/python/twitter/thermos/monitoring:process'),
- pants('src/main/python/twitter/thermos/monitoring:resource'),
- pants('src/main/thrift/com/twitter/thermos:py-thrift'),
+ pants('src/main/python/apache/thermos/common:path'),
+ pants('src/main/python/apache/thermos/monitoring:detector'),
+ pants('src/main/python/apache/thermos/monitoring:monitor'),
+ pants('src/main/python/apache/thermos/monitoring:process'),
+ pants('src/main/python/apache/thermos/monitoring:resource'),
+ pants('src/main/thrift/org/apache/thermos:py-thrift'),
]
)
@@ -34,18 +34,18 @@ python_library(
name = 'observer',
dependencies = [
pants(':task_observer'),
- pants('src/main/python/twitter/thermos/observer/http:http_observer'),
+ pants('src/main/python/apache/thermos/observer/http:http_observer'),
# covering libraries
- pants('src/main/python/twitter/thermos/common'),
- pants('src/main/python/twitter/thermos/config'),
- pants('src/main/python/twitter/thermos/monitoring'),
+ pants('src/main/python/apache/thermos/common'),
+ pants('src/main/python/apache/thermos/config'),
+ pants('src/main/python/apache/thermos/monitoring'),
],
provides = setup_py(
- name = 'twitter.thermos.observer',
+ name = 'apache.thermos.observer',
version = open(os.path.join(get_buildroot(), '.auroraversion')).read().strip().lower(),
description = 'The Thermos observer web interface.',
).with_binaries(
- thermos_observer = pants('src/main/python/twitter/thermos/observer/bin:thermos_observer'),
+ thermos_observer = pants('src/main/python/apache/thermos/observer/bin:thermos_observer'),
)
)
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/main/python/apache/thermos/observer/bin/BUILD
----------------------------------------------------------------------
diff --git a/src/main/python/apache/thermos/observer/bin/BUILD b/src/main/python/apache/thermos/observer/bin/BUILD
index 26eb148..9770501 100644
--- a/src/main/python/apache/thermos/observer/bin/BUILD
+++ b/src/main/python/apache/thermos/observer/bin/BUILD
@@ -1,14 +1,14 @@
python_binary(
name = 'thermos_observer',
source = 'thermos_observer.py',
- entry_point = 'twitter.thermos.observer.bin.thermos_observer:proxy_main',
+ entry_point = 'apache.thermos.observer.bin.thermos_observer:proxy_main',
dependencies = [
pants('aurora/twitterdeps/src/python/twitter/common/app'),
pants('aurora/twitterdeps/src/python/twitter/common/exceptions'),
pants('aurora/twitterdeps/src/python/twitter/common/http'),
- pants('src/main/python/twitter/thermos:cherrypy'),
- pants('src/main/python/twitter/thermos/common:path'),
- pants('src/main/python/twitter/thermos/observer/http:http_observer'),
- pants('src/main/python/twitter/thermos/observer:task_observer'),
+ pants('src/main/python/apache/thermos:cherrypy'),
+ pants('src/main/python/apache/thermos/common:path'),
+ pants('src/main/python/apache/thermos/observer/http:http_observer'),
+ pants('src/main/python/apache/thermos/observer:task_observer'),
],
)
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/main/python/apache/thermos/observer/bin/thermos_observer.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/thermos/observer/bin/thermos_observer.py b/src/main/python/apache/thermos/observer/bin/thermos_observer.py
index 9e7f7a0..f74e42c 100644
--- a/src/main/python/apache/thermos/observer/bin/thermos_observer.py
+++ b/src/main/python/apache/thermos/observer/bin/thermos_observer.py
@@ -8,9 +8,9 @@ from twitter.common import app
from twitter.common.exceptions import ExceptionalThread
from twitter.common.http import HttpServer
from twitter.common.http.diagnostics import DiagnosticsEndpoints
-from twitter.thermos.common.path import TaskPath
-from twitter.thermos.observer.task_observer import TaskObserver
-from twitter.thermos.observer.http.http_observer import BottleObserver
+from apache.thermos.common.path import TaskPath
+from apache.thermos.observer.task_observer import TaskObserver
+from apache.thermos.observer.http.http_observer import BottleObserver
app.add_option("--root",
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/main/python/apache/thermos/observer/http/BUILD
----------------------------------------------------------------------
diff --git a/src/main/python/apache/thermos/observer/http/BUILD b/src/main/python/apache/thermos/observer/http/BUILD
index 9f3d587..7284d6f 100644
--- a/src/main/python/apache/thermos/observer/http/BUILD
+++ b/src/main/python/apache/thermos/observer/http/BUILD
@@ -11,7 +11,7 @@ python_library(
sources = ['static_assets.py'],
resources = rglobs('assets/*'),
dependencies = [
- pants('src/main/python/twitter/thermos:bottle'),
+ pants('src/main/python/apache/thermos:bottle'),
]
)
@@ -28,8 +28,8 @@ python_library(
pants(':templating'),
pants('aurora/twitterdeps/src/python/twitter/common/log'),
pants('aurora/twitterdeps/src/python/twitter/common/http'),
- pants('src/main/python/twitter/thermos:bottle'),
- pants('src/main/python/twitter/thermos:mako'),
+ pants('src/main/python/apache/thermos:bottle'),
+ pants('src/main/python/apache/thermos:mako'),
]
)
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/main/python/apache/thermos/observer/observed_task.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/thermos/observer/observed_task.py b/src/main/python/apache/thermos/observer/observed_task.py
index f995998..535915d 100644
--- a/src/main/python/apache/thermos/observer/observed_task.py
+++ b/src/main/python/apache/thermos/observer/observed_task.py
@@ -3,9 +3,9 @@ import os
from twitter.common import log
from twitter.common.lang import AbstractClass
-from twitter.thermos.config.loader import ThermosTaskWrapper
-from twitter.thermos.config.schema import ThermosContext
-from twitter.thermos.common.ckpt import CheckpointDispatcher
+from apache.thermos.config.loader import ThermosTaskWrapper
+from apache.thermos.config.schema import ThermosContext
+from apache.thermos.common.ckpt import CheckpointDispatcher
from pystachio import Environment
@@ -85,7 +85,7 @@ class ObservedTask(AbstractClass):
@abstractproperty
def state(self):
- """Return state of task (gen.twitter.thermos.ttypes.RunnerState)"""
+ """Return state of task (gen.apache.thermos.ttypes.RunnerState)"""
class ActiveObservedTask(ObservedTask):
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/main/python/apache/thermos/observer/task_observer.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/thermos/observer/task_observer.py b/src/main/python/apache/thermos/observer/task_observer.py
index b6ebcf7..f8aff18 100644
--- a/src/main/python/apache/thermos/observer/task_observer.py
+++ b/src/main/python/apache/thermos/observer/task_observer.py
@@ -15,13 +15,13 @@ from twitter.common.exceptions import ExceptionalThread
from twitter.common.lang import Lockable
from twitter.common.quantity import Amount, Time
-from twitter.thermos.common.path import TaskPath
-from twitter.thermos.monitoring.detector import TaskDetector
-from twitter.thermos.monitoring.monitor import TaskMonitor
-from twitter.thermos.monitoring.process import ProcessSample
-from twitter.thermos.monitoring.resource import ResourceMonitorBase, TaskResourceMonitor
+from apache.thermos.common.path import TaskPath
+from apache.thermos.monitoring.detector import TaskDetector
+from apache.thermos.monitoring.monitor import TaskMonitor
+from apache.thermos.monitoring.process import ProcessSample
+from apache.thermos.monitoring.resource import ResourceMonitorBase, TaskResourceMonitor
-from gen.twitter.thermos.ttypes import ProcessState, TaskState
+from gen.apache.thermos.ttypes import ProcessState, TaskState
from .observed_task import ActiveObservedTask, FinishedObservedTask
@@ -208,7 +208,7 @@ class TaskObserver(ExceptionalThread, Lockable):
@Lockable.sync
def raw_state(self, task_id):
"""
- Return the current runner state (thrift blob: gen.twitter.thermos.ttypes.RunnerState)
+ Return the current runner state (thrift blob: gen.apache.thermos.ttypes.RunnerState)
of a given task id
"""
if task_id not in self.all_tasks:
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/main/python/apache/thermos/testing/BUILD
----------------------------------------------------------------------
diff --git a/src/main/python/apache/thermos/testing/BUILD b/src/main/python/apache/thermos/testing/BUILD
index b5485d0..167abca 100644
--- a/src/main/python/apache/thermos/testing/BUILD
+++ b/src/main/python/apache/thermos/testing/BUILD
@@ -4,11 +4,11 @@ python_library(
dependencies = [
pants('aurora/twitterdeps/src/python/twitter/common/contextutil'),
pants('aurora/twitterdeps/src/python/twitter/common/log'),
- pants('src/main/python/twitter/thermos/common:ckpt'),
- pants('src/main/python/twitter/thermos/common:path'),
- pants('src/main/python/twitter/thermos/config'),
- pants('src/main/python/twitter/thermos/core'),
- pants('src/main/python/twitter/thermos:thrift'),
- pants('src/main/thrift/com/twitter/thermos:py-thrift'),
+ pants('src/main/python/apache/thermos/common:ckpt'),
+ pants('src/main/python/apache/thermos/common:path'),
+ pants('src/main/python/apache/thermos/config'),
+ pants('src/main/python/apache/thermos/core'),
+ pants('src/main/python/apache/thermos:thrift'),
+ pants('src/main/thrift/org/apache/thermos:py-thrift'),
]
)
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/main/python/apache/thermos/testing/runner.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/thermos/testing/runner.py b/src/main/python/apache/thermos/testing/runner.py
index 930f41b..8f5a9f9 100644
--- a/src/main/python/apache/thermos/testing/runner.py
+++ b/src/main/python/apache/thermos/testing/runner.py
@@ -11,12 +11,12 @@ import time
from twitter.common import log
from twitter.common.contextutil import temporary_file, environment_as
-from twitter.thermos.common.path import TaskPath
-from twitter.thermos.common.ckpt import CheckpointDispatcher
-from twitter.thermos.config.loader import ThermosTaskWrapper
+from apache.thermos.common.path import TaskPath
+from apache.thermos.common.ckpt import CheckpointDispatcher
+from apache.thermos.config.loader import ThermosTaskWrapper
from thrift.TSerialization import deserialize as thrift_deserialize
-from gen.twitter.thermos.ttypes import (
+from gen.apache.thermos.ttypes import (
TaskState,
RunnerCkpt,
RunnerState,
@@ -30,9 +30,9 @@ import random
import sys
from twitter.common import log
from twitter.common.log.options import LogOptions
-from twitter.thermos.config.loader import ThermosConfigLoader
-from twitter.thermos.core.helper import TaskRunnerHelper
-from twitter.thermos.core.runner import TaskRunner, TaskRunnerUniversalHandler
+from apache.thermos.config.loader import ThermosConfigLoader
+from apache.thermos.core.helper import TaskRunnerHelper
+from apache.thermos.core.runner import TaskRunner, TaskRunnerUniversalHandler
from thrift.TSerialization import serialize as thrift_serialize
random.seed(%(random_seed)d)
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/main/thrift/org/apache/aurora/gen/BUILD
----------------------------------------------------------------------
diff --git a/src/main/thrift/org/apache/aurora/gen/BUILD b/src/main/thrift/org/apache/aurora/gen/BUILD
index 33e94ab..c09a518 100644
--- a/src/main/thrift/org/apache/aurora/gen/BUILD
+++ b/src/main/thrift/org/apache/aurora/gen/BUILD
@@ -43,7 +43,7 @@ python_library(
pants(':py-thrift-storage'),
],
provides = setup_py(
- name = 'twitter.gen.aurora',
+ name = 'apache.gen.aurora',
version = open(os.path.join(get_buildroot(), '.auroraversion')).read().strip().lower(),
description = 'Autogenerated Aurora thrift schemas.',
)
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/main/thrift/org/apache/aurora/gen/api.thrift
----------------------------------------------------------------------
diff --git a/src/main/thrift/org/apache/aurora/gen/api.thrift b/src/main/thrift/org/apache/aurora/gen/api.thrift
index ef96f36..74cdf1b 100644
--- a/src/main/thrift/org/apache/aurora/gen/api.thrift
+++ b/src/main/thrift/org/apache/aurora/gen/api.thrift
@@ -11,8 +11,8 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-namespace java com.twitter.aurora.gen
-namespace py gen.twitter.aurora
+namespace java org.apache.aurora.gen
+namespace py gen.apache.aurora
// Thrift interface definition for the aurora scheduler.
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/main/thrift/org/apache/aurora/gen/internal_rpc.thrift
----------------------------------------------------------------------
diff --git a/src/main/thrift/org/apache/aurora/gen/internal_rpc.thrift b/src/main/thrift/org/apache/aurora/gen/internal_rpc.thrift
index ab900d9..6a242d1 100644
--- a/src/main/thrift/org/apache/aurora/gen/internal_rpc.thrift
+++ b/src/main/thrift/org/apache/aurora/gen/internal_rpc.thrift
@@ -11,8 +11,8 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-namespace java com.twitter.aurora.gen.comm
-namespace py gen.twitter.aurora.comm
+namespace java org.apache.aurora.gen.comm
+namespace py gen.apache.aurora.comm
include "api.thrift"
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/main/thrift/org/apache/aurora/gen/storage.thrift
----------------------------------------------------------------------
diff --git a/src/main/thrift/org/apache/aurora/gen/storage.thrift b/src/main/thrift/org/apache/aurora/gen/storage.thrift
index ab1e104..a66c3de 100644
--- a/src/main/thrift/org/apache/aurora/gen/storage.thrift
+++ b/src/main/thrift/org/apache/aurora/gen/storage.thrift
@@ -11,8 +11,8 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-namespace java com.twitter.aurora.gen.storage
-namespace py gen.twitter.aurora.storage
+namespace java org.apache.aurora.gen.storage
+namespace py gen.apache.aurora.storage
include "api.thrift"
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/main/thrift/org/apache/aurora/gen/storage_local.thrift
----------------------------------------------------------------------
diff --git a/src/main/thrift/org/apache/aurora/gen/storage_local.thrift b/src/main/thrift/org/apache/aurora/gen/storage_local.thrift
index 9f8d3c1..5eb705c 100644
--- a/src/main/thrift/org/apache/aurora/gen/storage_local.thrift
+++ b/src/main/thrift/org/apache/aurora/gen/storage_local.thrift
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// Thrift structures for a local log storage system, for use in simulated environments.
-namespace java com.twitter.aurora.gen.test
+namespace java org.apache.aurora.gen.test
struct LogRecord {
1: binary contents
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/main/thrift/org/apache/aurora/gen/test.thrift
----------------------------------------------------------------------
diff --git a/src/main/thrift/org/apache/aurora/gen/test.thrift b/src/main/thrift/org/apache/aurora/gen/test.thrift
index 3494019..66ee015 100644
--- a/src/main/thrift/org/apache/aurora/gen/test.thrift
+++ b/src/main/thrift/org/apache/aurora/gen/test.thrift
@@ -11,8 +11,8 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-namespace java com.twitter.aurora.gen.test
-namespace py gen.twitter.aurora.test
+namespace java org.apache.aurora.gen.test
+namespace py gen.apache.aurora.test
// Test data for Thrift interface definition for the Twitter Mesos Scheduler.
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/main/thrift/org/apache/thermos/BUILD
----------------------------------------------------------------------
diff --git a/src/main/thrift/org/apache/thermos/BUILD b/src/main/thrift/org/apache/thermos/BUILD
index 2c9a216..2441154 100644
--- a/src/main/thrift/org/apache/thermos/BUILD
+++ b/src/main/thrift/org/apache/thermos/BUILD
@@ -4,7 +4,7 @@ python_thrift_library(
name = 'py-thrift',
sources = ['thermos_internal.thrift'],
provides = setup_py(
- name = 'twitter.gen.thermos',
+ name = 'apache.gen.thermos',
version = open(os.path.join(get_buildroot(), '.auroraversion')).read().strip().lower(),
description = 'Autogenerated Thermos thrift schemas.',
)
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/main/thrift/org/apache/thermos/thermos_internal.thrift
----------------------------------------------------------------------
diff --git a/src/main/thrift/org/apache/thermos/thermos_internal.thrift b/src/main/thrift/org/apache/thermos/thermos_internal.thrift
index dc238f9..5fc8b26 100644
--- a/src/main/thrift/org/apache/thermos/thermos_internal.thrift
+++ b/src/main/thrift/org/apache/thermos/thermos_internal.thrift
@@ -1,4 +1,4 @@
-namespace py gen.twitter.thermos
+namespace py gen.apache.thermos
enum ProcessState {
// normal state
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/GuiceUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/GuiceUtilsTest.java b/src/test/java/org/apache/aurora/GuiceUtilsTest.java
index 80472fe..46e0a33 100644
--- a/src/test/java/org/apache/aurora/GuiceUtilsTest.java
+++ b/src/test/java/org/apache/aurora/GuiceUtilsTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora;
+package org.apache.aurora;
import java.util.List;
@@ -25,9 +25,9 @@ import com.google.inject.CreationException;
import com.google.inject.Guice;
import com.google.inject.Injector;
-import org.junit.Test;
+import org.apache.aurora.GuiceUtils.AllowUnchecked;
-import com.twitter.aurora.GuiceUtils.AllowUnchecked;
+import org.junit.Test;
import static org.junit.Assert.fail;
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/codec/ThriftBinaryCodecTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/codec/ThriftBinaryCodecTest.java b/src/test/java/org/apache/aurora/codec/ThriftBinaryCodecTest.java
index 02db510..441694d 100644
--- a/src/test/java/org/apache/aurora/codec/ThriftBinaryCodecTest.java
+++ b/src/test/java/org/apache/aurora/codec/ThriftBinaryCodecTest.java
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora.codec;
+package org.apache.aurora.codec;
-import org.junit.Test;
+import org.apache.aurora.codec.ThriftBinaryCodec.CodingException;
+import org.apache.aurora.gen.Identity;
-import com.twitter.aurora.codec.ThriftBinaryCodec.CodingException;
-import com.twitter.aurora.gen.Identity;
+import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/scheduler/DriverFactoryImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/DriverFactoryImplTest.java b/src/test/java/org/apache/aurora/scheduler/DriverFactoryImplTest.java
index e8d9998..a68499c 100644
--- a/src/test/java/org/apache/aurora/scheduler/DriverFactoryImplTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/DriverFactoryImplTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora.scheduler;
+package org.apache.aurora.scheduler;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@@ -22,11 +22,12 @@ import java.util.Properties;
import com.google.common.base.Throwables;
-import org.junit.Test;
-
-import com.twitter.aurora.scheduler.DriverFactory.DriverFactoryImpl;
import com.twitter.common.testing.easymock.EasyMockTest;
+import org.apache.aurora.scheduler.DriverFactory.DriverFactoryImpl;
+
+import org.junit.Test;
+
import static org.junit.Assert.assertEquals;
public class DriverFactoryImplTest extends EasyMockTest {
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/scheduler/DriverTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/DriverTest.java b/src/test/java/org/apache/aurora/scheduler/DriverTest.java
index f6f7c23..d9c85d3 100644
--- a/src/test/java/org/apache/aurora/scheduler/DriverTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/DriverTest.java
@@ -13,22 +13,26 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora.scheduler;
+package org.apache.aurora.scheduler;
import com.google.common.base.Optional;
import com.google.common.base.Supplier;
+import com.twitter.common.testing.easymock.EasyMockTest;
+
+import org.apache.aurora.scheduler.Driver.DriverImpl;
+
import org.apache.mesos.Protos;
import org.apache.mesos.SchedulerDriver;
+
import org.junit.Before;
import org.junit.Test;
-import com.twitter.aurora.scheduler.Driver.DriverImpl;
-import com.twitter.common.testing.easymock.EasyMockTest;
-
import static org.apache.mesos.Protos.Status.DRIVER_ABORTED;
import static org.apache.mesos.Protos.Status.DRIVER_RUNNING;
+
import static org.easymock.EasyMock.expect;
+
import static org.junit.Assert.assertEquals;
public class DriverTest extends EasyMockTest {
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/scheduler/MesosSchedulerImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/MesosSchedulerImplTest.java b/src/test/java/org/apache/aurora/scheduler/MesosSchedulerImplTest.java
index 286182a..95c9928 100644
--- a/src/test/java/org/apache/aurora/scheduler/MesosSchedulerImplTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/MesosSchedulerImplTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora.scheduler;
+package org.apache.aurora.scheduler;
import java.lang.Thread.UncaughtExceptionHandler;
import java.util.Arrays;
@@ -28,6 +28,23 @@ import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.TypeLiteral;
+import com.twitter.common.application.Lifecycle;
+import com.twitter.common.base.Closure;
+import com.twitter.common.base.Command;
+import com.twitter.common.testing.easymock.EasyMockTest;
+
+import org.apache.aurora.scheduler.base.Conversions;
+import org.apache.aurora.scheduler.base.SchedulerException;
+import org.apache.aurora.scheduler.configuration.Resources;
+import org.apache.aurora.scheduler.events.PubsubEvent;
+import org.apache.aurora.scheduler.events.PubsubEvent.DriverDisconnected;
+import org.apache.aurora.scheduler.events.PubsubEvent.DriverRegistered;
+import org.apache.aurora.scheduler.events.PubsubEventModule;
+import org.apache.aurora.scheduler.state.SchedulerCore;
+import org.apache.aurora.scheduler.storage.Storage;
+import org.apache.aurora.scheduler.storage.Storage.StorageException;
+import org.apache.aurora.scheduler.storage.testing.StorageTestUtil;
+
import org.apache.mesos.Protos.FrameworkID;
import org.apache.mesos.Protos.MasterInfo;
import org.apache.mesos.Protos.Offer;
@@ -38,27 +55,14 @@ import org.apache.mesos.Protos.TaskInfo;
import org.apache.mesos.Protos.TaskState;
import org.apache.mesos.Protos.TaskStatus;
import org.apache.mesos.SchedulerDriver;
+
import org.junit.Before;
import org.junit.Test;
-import com.twitter.aurora.scheduler.base.Conversions;
-import com.twitter.aurora.scheduler.base.SchedulerException;
-import com.twitter.aurora.scheduler.configuration.Resources;
-import com.twitter.aurora.scheduler.events.PubsubEvent;
-import com.twitter.aurora.scheduler.events.PubsubEvent.DriverDisconnected;
-import com.twitter.aurora.scheduler.events.PubsubEvent.DriverRegistered;
-import com.twitter.aurora.scheduler.events.PubsubEventModule;
-import com.twitter.aurora.scheduler.state.SchedulerCore;
-import com.twitter.aurora.scheduler.storage.Storage;
-import com.twitter.aurora.scheduler.storage.Storage.StorageException;
-import com.twitter.aurora.scheduler.storage.testing.StorageTestUtil;
-import com.twitter.common.application.Lifecycle;
-import com.twitter.common.base.Closure;
-import com.twitter.common.base.Command;
-import com.twitter.common.testing.easymock.EasyMockTest;
-
import static org.apache.mesos.Protos.Status.DRIVER_RUNNING;
+
import static org.easymock.EasyMock.expect;
+
import static org.junit.Assert.assertTrue;
public class MesosSchedulerImplTest extends EasyMockTest {
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/scheduler/MesosTaskFactoryImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/MesosTaskFactoryImplTest.java b/src/test/java/org/apache/aurora/scheduler/MesosTaskFactoryImplTest.java
index a1742e0..b5dcc0d 100644
--- a/src/test/java/org/apache/aurora/scheduler/MesosTaskFactoryImplTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/MesosTaskFactoryImplTest.java
@@ -13,7 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora.scheduler;
+package org.apache.aurora.scheduler;
+
+import com.twitter.common.quantity.Data;
+
+import org.apache.aurora.gen.AssignedTask;
+import org.apache.aurora.gen.Identity;
+import org.apache.aurora.gen.TaskConfig;
+import org.apache.aurora.scheduler.MesosTaskFactory.ExecutorConfig;
+import org.apache.aurora.scheduler.MesosTaskFactory.MesosTaskFactoryImpl;
+import org.apache.aurora.scheduler.storage.entities.IAssignedTask;
import org.apache.mesos.Protos.CommandInfo;
import org.apache.mesos.Protos.CommandInfo.URI;
@@ -23,17 +32,10 @@ import org.apache.mesos.Protos.SlaveID;
import org.apache.mesos.Protos.TaskInfo;
import org.apache.mesos.Protos.Value.Scalar;
import org.apache.mesos.Protos.Value.Type;
+
import org.junit.Before;
import org.junit.Test;
-import com.twitter.aurora.gen.AssignedTask;
-import com.twitter.aurora.gen.Identity;
-import com.twitter.aurora.gen.TaskConfig;
-import com.twitter.aurora.scheduler.MesosTaskFactory.ExecutorConfig;
-import com.twitter.aurora.scheduler.MesosTaskFactory.MesosTaskFactoryImpl;
-import com.twitter.aurora.scheduler.storage.entities.IAssignedTask;
-import com.twitter.common.quantity.Data;
-
import static org.junit.Assert.assertEquals;
public class MesosTaskFactoryImplTest {
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/scheduler/SchedulerLifecycleTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/SchedulerLifecycleTest.java b/src/test/java/org/apache/aurora/scheduler/SchedulerLifecycleTest.java
index a748e6c..f0bbc99 100644
--- a/src/test/java/org/apache/aurora/scheduler/SchedulerLifecycleTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/SchedulerLifecycleTest.java
@@ -13,22 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora.scheduler;
+package org.apache.aurora.scheduler;
import java.lang.Thread.UncaughtExceptionHandler;
-import org.apache.mesos.Protos.Status;
-import org.apache.mesos.SchedulerDriver;
-import org.easymock.Capture;
-import org.easymock.EasyMock;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.twitter.aurora.scheduler.SchedulerLifecycle.DelayedActions;
-import com.twitter.aurora.scheduler.SchedulerLifecycle.DriverReference;
-import com.twitter.aurora.scheduler.events.PubsubEvent.DriverRegistered;
-import com.twitter.aurora.scheduler.storage.Storage.MutateWork.NoResult.Quiet;
-import com.twitter.aurora.scheduler.storage.testing.StorageTestUtil;
import com.twitter.common.application.Lifecycle;
import com.twitter.common.base.Command;
import com.twitter.common.testing.easymock.EasyMockTest;
@@ -36,8 +24,24 @@ import com.twitter.common.util.Clock;
import com.twitter.common.zookeeper.SingletonService.LeaderControl;
import com.twitter.common.zookeeper.SingletonService.LeadershipListener;
+import org.apache.aurora.scheduler.SchedulerLifecycle.DelayedActions;
+import org.apache.aurora.scheduler.SchedulerLifecycle.DriverReference;
+import org.apache.aurora.scheduler.events.PubsubEvent.DriverRegistered;
+import org.apache.aurora.scheduler.storage.Storage.MutateWork.NoResult.Quiet;
+import org.apache.aurora.scheduler.storage.testing.StorageTestUtil;
+
+import org.apache.mesos.Protos.Status;
+import org.apache.mesos.SchedulerDriver;
+
+import org.easymock.Capture;
+import org.easymock.EasyMock;
+
+import org.junit.Before;
+import org.junit.Test;
+
import static org.easymock.EasyMock.capture;
import static org.easymock.EasyMock.expect;
+
import static org.junit.Assert.fail;
public class SchedulerLifecycleTest extends EasyMockTest {
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/scheduler/TaskVarsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/TaskVarsTest.java b/src/test/java/org/apache/aurora/scheduler/TaskVarsTest.java
index 1d93e6b..9e53c30 100644
--- a/src/test/java/org/apache/aurora/scheduler/TaskVarsTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/TaskVarsTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora.scheduler;
+package org.apache.aurora.scheduler;
import java.util.Map;
import java.util.concurrent.atomic.AtomicLong;
@@ -22,36 +22,39 @@ import com.google.common.base.Optional;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Maps;
+import com.twitter.common.stats.StatsProvider;
+import com.twitter.common.testing.easymock.EasyMockTest;
+
+import org.apache.aurora.gen.AssignedTask;
+import org.apache.aurora.gen.Attribute;
+import org.apache.aurora.gen.HostAttributes;
+import org.apache.aurora.gen.Identity;
+import org.apache.aurora.gen.ScheduleStatus;
+import org.apache.aurora.gen.ScheduledTask;
+import org.apache.aurora.gen.TaskConfig;
+import org.apache.aurora.scheduler.base.Query;
+import org.apache.aurora.scheduler.events.PubsubEvent.StorageStarted;
+import org.apache.aurora.scheduler.events.PubsubEvent.TaskStateChange;
+import org.apache.aurora.scheduler.events.PubsubEvent.TasksDeleted;
+import org.apache.aurora.scheduler.storage.entities.IScheduledTask;
+import org.apache.aurora.scheduler.storage.testing.StorageTestUtil;
+
import org.easymock.IExpectationSetters;
+
import org.junit.Before;
import org.junit.Test;
-import com.twitter.aurora.gen.AssignedTask;
-import com.twitter.aurora.gen.Attribute;
-import com.twitter.aurora.gen.HostAttributes;
-import com.twitter.aurora.gen.Identity;
-import com.twitter.aurora.gen.ScheduleStatus;
-import com.twitter.aurora.gen.ScheduledTask;
-import com.twitter.aurora.gen.TaskConfig;
-import com.twitter.aurora.scheduler.base.Query;
-import com.twitter.aurora.scheduler.events.PubsubEvent.StorageStarted;
-import com.twitter.aurora.scheduler.events.PubsubEvent.TaskStateChange;
-import com.twitter.aurora.scheduler.events.PubsubEvent.TasksDeleted;
-import com.twitter.aurora.scheduler.storage.entities.IScheduledTask;
-import com.twitter.aurora.scheduler.storage.testing.StorageTestUtil;
-import com.twitter.common.stats.StatsProvider;
-import com.twitter.common.testing.easymock.EasyMockTest;
+import static org.apache.aurora.gen.ScheduleStatus.ASSIGNED;
+import static org.apache.aurora.gen.ScheduleStatus.FAILED;
+import static org.apache.aurora.gen.ScheduleStatus.FINISHED;
+import static org.apache.aurora.gen.ScheduleStatus.INIT;
+import static org.apache.aurora.gen.ScheduleStatus.LOST;
+import static org.apache.aurora.gen.ScheduleStatus.PENDING;
+import static org.apache.aurora.gen.ScheduleStatus.RUNNING;
import static org.easymock.EasyMock.expect;
-import static org.junit.Assert.assertEquals;
-import static com.twitter.aurora.gen.ScheduleStatus.ASSIGNED;
-import static com.twitter.aurora.gen.ScheduleStatus.FAILED;
-import static com.twitter.aurora.gen.ScheduleStatus.FINISHED;
-import static com.twitter.aurora.gen.ScheduleStatus.INIT;
-import static com.twitter.aurora.gen.ScheduleStatus.LOST;
-import static com.twitter.aurora.gen.ScheduleStatus.PENDING;
-import static com.twitter.aurora.gen.ScheduleStatus.RUNNING;
+import static org.junit.Assert.assertEquals;
public class TaskVarsTest extends EasyMockTest {
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/scheduler/UserTaskLauncherTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/UserTaskLauncherTest.java b/src/test/java/org/apache/aurora/scheduler/UserTaskLauncherTest.java
index 5d7366b..68be681 100644
--- a/src/test/java/org/apache/aurora/scheduler/UserTaskLauncherTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/UserTaskLauncherTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora.scheduler;
+package org.apache.aurora.scheduler;
import java.util.Set;
@@ -22,6 +22,15 @@ import com.google.common.base.Optional;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
+import com.twitter.common.collections.Pair;
+import com.twitter.common.testing.easymock.EasyMockTest;
+
+import org.apache.aurora.scheduler.async.OfferQueue;
+import org.apache.aurora.scheduler.base.Query;
+import org.apache.aurora.scheduler.configuration.Resources;
+import org.apache.aurora.scheduler.state.StateManager;
+import org.apache.aurora.scheduler.storage.Storage.StorageException;
+
import org.apache.mesos.Protos.Attribute;
import org.apache.mesos.Protos.FrameworkID;
import org.apache.mesos.Protos.Offer;
@@ -36,25 +45,19 @@ import org.apache.mesos.Protos.Value.Ranges;
import org.apache.mesos.Protos.Value.Scalar;
import org.apache.mesos.Protos.Value.Text;
import org.apache.mesos.Protos.Value.Type;
+
import org.junit.Before;
import org.junit.Test;
-import com.twitter.aurora.scheduler.async.OfferQueue;
-import com.twitter.aurora.scheduler.base.Query;
-import com.twitter.aurora.scheduler.configuration.Resources;
-import com.twitter.aurora.scheduler.state.StateManager;
-import com.twitter.aurora.scheduler.storage.Storage.StorageException;
-import com.twitter.common.collections.Pair;
-import com.twitter.common.testing.easymock.EasyMockTest;
+import static org.apache.aurora.gen.ScheduleStatus.FAILED;
+import static org.apache.aurora.gen.ScheduleStatus.RUNNING;
+import static org.apache.aurora.scheduler.configuration.ConfigurationManager.HOST_CONSTRAINT;
import static org.easymock.EasyMock.expect;
+
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
-import static com.twitter.aurora.gen.ScheduleStatus.FAILED;
-import static com.twitter.aurora.gen.ScheduleStatus.RUNNING;
-import static com.twitter.aurora.scheduler.configuration.ConfigurationManager.HOST_CONSTRAINT;
-
public class UserTaskLauncherTest extends EasyMockTest {
private static final String FRAMEWORK_ID = "FrameworkId";
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java b/src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java
index 1242d46..fc536d2 100644
--- a/src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java
+++ b/src/test/java/org/apache/aurora/scheduler/app/SchedulerIT.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora.scheduler.app;
+package org.apache.aurora.scheduler.app;
import java.io.File;
import java.io.IOException;
@@ -46,44 +46,6 @@ import com.google.inject.Injector;
import com.google.inject.Key;
import com.google.inject.Module;
-import org.apache.mesos.Protos.FrameworkID;
-import org.apache.mesos.Protos.MasterInfo;
-import org.apache.mesos.Protos.Status;
-import org.apache.mesos.Scheduler;
-import org.apache.mesos.SchedulerDriver;
-import org.easymock.IAnswer;
-import org.easymock.IMocksControl;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.twitter.aurora.codec.ThriftBinaryCodec.CodingException;
-import com.twitter.aurora.gen.AssignedTask;
-import com.twitter.aurora.gen.Identity;
-import com.twitter.aurora.gen.ScheduleStatus;
-import com.twitter.aurora.gen.ScheduledTask;
-import com.twitter.aurora.gen.TaskConfig;
-import com.twitter.aurora.gen.TaskEvent;
-import com.twitter.aurora.gen.storage.LogEntry;
-import com.twitter.aurora.gen.storage.Op;
-import com.twitter.aurora.gen.storage.SaveFrameworkId;
-import com.twitter.aurora.gen.storage.SaveTasks;
-import com.twitter.aurora.gen.storage.Snapshot;
-import com.twitter.aurora.gen.storage.Transaction;
-import com.twitter.aurora.gen.storage.storageConstants;
-import com.twitter.aurora.scheduler.DriverFactory;
-import com.twitter.aurora.scheduler.MesosTaskFactory.ExecutorConfig;
-import com.twitter.aurora.scheduler.configuration.ConfigurationManager;
-import com.twitter.aurora.scheduler.log.Log;
-import com.twitter.aurora.scheduler.log.Log.Entry;
-import com.twitter.aurora.scheduler.log.Log.Position;
-import com.twitter.aurora.scheduler.log.Log.Stream;
-import com.twitter.aurora.scheduler.storage.backup.BackupModule;
-import com.twitter.aurora.scheduler.storage.log.LogManager.StreamManager.EntrySerializer;
-import com.twitter.aurora.scheduler.storage.log.LogStorageModule;
-import com.twitter.aurora.scheduler.storage.log.SnapshotStoreImpl;
-import com.twitter.aurora.scheduler.storage.log.testing.LogOpMatcher;
-import com.twitter.aurora.scheduler.storage.log.testing.LogOpMatcher.StreamMatcher;
-import com.twitter.aurora.scheduler.thrift.ThriftConfiguration;
import com.twitter.common.application.Lifecycle;
import com.twitter.common.application.StartupStage;
import com.twitter.common.application.modules.AppLauncherModule;
@@ -104,9 +66,51 @@ import com.twitter.common.zookeeper.testing.BaseZooKeeperTest;
import com.twitter.thrift.Endpoint;
import com.twitter.thrift.ServiceInstance;
+import org.apache.aurora.codec.ThriftBinaryCodec.CodingException;
+import org.apache.aurora.gen.AssignedTask;
+import org.apache.aurora.gen.Identity;
+import org.apache.aurora.gen.ScheduleStatus;
+import org.apache.aurora.gen.ScheduledTask;
+import org.apache.aurora.gen.TaskConfig;
+import org.apache.aurora.gen.TaskEvent;
+import org.apache.aurora.gen.storage.LogEntry;
+import org.apache.aurora.gen.storage.Op;
+import org.apache.aurora.gen.storage.SaveFrameworkId;
+import org.apache.aurora.gen.storage.SaveTasks;
+import org.apache.aurora.gen.storage.Snapshot;
+import org.apache.aurora.gen.storage.Transaction;
+import org.apache.aurora.gen.storage.storageConstants;
+import org.apache.aurora.scheduler.DriverFactory;
+import org.apache.aurora.scheduler.MesosTaskFactory.ExecutorConfig;
+import org.apache.aurora.scheduler.configuration.ConfigurationManager;
+import org.apache.aurora.scheduler.log.Log;
+import org.apache.aurora.scheduler.log.Log.Entry;
+import org.apache.aurora.scheduler.log.Log.Position;
+import org.apache.aurora.scheduler.log.Log.Stream;
+import org.apache.aurora.scheduler.storage.backup.BackupModule;
+import org.apache.aurora.scheduler.storage.log.LogManager.StreamManager.EntrySerializer;
+import org.apache.aurora.scheduler.storage.log.LogStorageModule;
+import org.apache.aurora.scheduler.storage.log.SnapshotStoreImpl;
+import org.apache.aurora.scheduler.storage.log.testing.LogOpMatcher;
+import org.apache.aurora.scheduler.storage.log.testing.LogOpMatcher.StreamMatcher;
+import org.apache.aurora.scheduler.thrift.ThriftConfiguration;
+
+import org.apache.mesos.Protos.FrameworkID;
+import org.apache.mesos.Protos.MasterInfo;
+import org.apache.mesos.Protos.Status;
+import org.apache.mesos.Scheduler;
+import org.apache.mesos.SchedulerDriver;
+
+import org.easymock.IAnswer;
+import org.easymock.IMocksControl;
+
+import org.junit.Before;
+import org.junit.Test;
+
import static org.easymock.EasyMock.createControl;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.expectLastCall;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -297,7 +301,7 @@ public class SchedulerIT extends BaseZooKeeperTest {
.setTask(new TaskConfig()
.setJobName("job-" + id)
.setEnvironment("test")
- .setExecutorConfig(new com.twitter.aurora.gen.ExecutorConfig("AuroraExecutor", ""))
+ .setExecutorConfig(new org.apache.aurora.gen.ExecutorConfig("AuroraExecutor", ""))
.setOwner(new Identity("role-" + id, "user-" + id))));
// Apply defaults here so that we can expect the same task that will be written to the stream.
ConfigurationManager.applyDefaultsIfUnset(scheduledTask.getAssignedTask().getTask());
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/scheduler/async/HistoryPrunerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/async/HistoryPrunerTest.java b/src/test/java/org/apache/aurora/scheduler/async/HistoryPrunerTest.java
index 254c334..9de2244 100644
--- a/src/test/java/org/apache/aurora/scheduler/async/HistoryPrunerTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/async/HistoryPrunerTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora.scheduler.async;
+package org.apache.aurora.scheduler.async;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executors;
@@ -26,48 +26,51 @@ import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.ImmutableSet;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import com.twitter.common.base.Command;
+import com.twitter.common.quantity.Amount;
+import com.twitter.common.quantity.Time;
+import com.twitter.common.testing.easymock.EasyMockTest;
+import com.twitter.common.util.testing.FakeClock;
+
+import org.apache.aurora.gen.AssignedTask;
+import org.apache.aurora.gen.ExecutorConfig;
+import org.apache.aurora.gen.Identity;
+import org.apache.aurora.gen.ScheduleStatus;
+import org.apache.aurora.gen.ScheduledTask;
+import org.apache.aurora.gen.TaskConfig;
+import org.apache.aurora.gen.TaskEvent;
+import org.apache.aurora.scheduler.base.Tasks;
+import org.apache.aurora.scheduler.events.PubsubEvent;
+import org.apache.aurora.scheduler.events.PubsubEvent.StorageStarted;
+import org.apache.aurora.scheduler.state.StateManager;
+import org.apache.aurora.scheduler.storage.entities.IJobKey;
+import org.apache.aurora.scheduler.storage.entities.IScheduledTask;
+import org.apache.aurora.scheduler.storage.testing.StorageTestUtil;
+
import org.easymock.Capture;
import org.easymock.EasyMock;
import org.easymock.IAnswer;
import org.easymock.IExpectationSetters;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import com.twitter.aurora.gen.AssignedTask;
-import com.twitter.aurora.gen.ExecutorConfig;
-import com.twitter.aurora.gen.Identity;
-import com.twitter.aurora.gen.ScheduleStatus;
-import com.twitter.aurora.gen.ScheduledTask;
-import com.twitter.aurora.gen.TaskConfig;
-import com.twitter.aurora.gen.TaskEvent;
-import com.twitter.aurora.scheduler.base.Tasks;
-import com.twitter.aurora.scheduler.events.PubsubEvent;
-import com.twitter.aurora.scheduler.events.PubsubEvent.StorageStarted;
-import com.twitter.aurora.scheduler.state.StateManager;
-import com.twitter.aurora.scheduler.storage.entities.IJobKey;
-import com.twitter.aurora.scheduler.storage.entities.IScheduledTask;
-import com.twitter.aurora.scheduler.storage.testing.StorageTestUtil;
-import com.twitter.common.base.Command;
-import com.twitter.common.quantity.Amount;
-import com.twitter.common.quantity.Time;
-import com.twitter.common.testing.easymock.EasyMockTest;
-import com.twitter.common.util.testing.FakeClock;
+import static org.apache.aurora.gen.ScheduleStatus.ASSIGNED;
+import static org.apache.aurora.gen.ScheduleStatus.FINISHED;
+import static org.apache.aurora.gen.ScheduleStatus.KILLED;
+import static org.apache.aurora.gen.ScheduleStatus.LOST;
+import static org.apache.aurora.gen.ScheduleStatus.RUNNING;
+import static org.apache.aurora.gen.ScheduleStatus.STARTING;
+import static org.apache.aurora.scheduler.events.PubsubEvent.TasksDeleted;
import static org.easymock.EasyMock.eq;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.expectLastCall;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
-import static com.twitter.aurora.gen.ScheduleStatus.ASSIGNED;
-import static com.twitter.aurora.gen.ScheduleStatus.FINISHED;
-import static com.twitter.aurora.gen.ScheduleStatus.KILLED;
-import static com.twitter.aurora.gen.ScheduleStatus.LOST;
-import static com.twitter.aurora.gen.ScheduleStatus.RUNNING;
-import static com.twitter.aurora.gen.ScheduleStatus.STARTING;
-import static com.twitter.aurora.scheduler.events.PubsubEvent.TasksDeleted;
-
public class HistoryPrunerTest extends EasyMockTest {
private static final String JOB_A = "job-a";
private static final String TASK_ID = "task_id";
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/scheduler/async/OfferQueueImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/async/OfferQueueImplTest.java b/src/test/java/org/apache/aurora/scheduler/async/OfferQueueImplTest.java
index ba2a8c5..dddc241 100644
--- a/src/test/java/org/apache/aurora/scheduler/async/OfferQueueImplTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/async/OfferQueueImplTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora.scheduler.async;
+package org.apache.aurora.scheduler.async;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
@@ -27,25 +27,29 @@ import com.google.common.base.Throwables;
import com.google.common.testing.TearDown;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import com.twitter.common.quantity.Amount;
+import com.twitter.common.quantity.Time;
+import com.twitter.common.testing.easymock.EasyMockTest;
+import com.twitter.common.util.concurrent.ExecutorServiceShutdown;
+
+import org.apache.aurora.gen.MaintenanceMode;
+import org.apache.aurora.scheduler.Driver;
+import org.apache.aurora.scheduler.async.OfferQueue.LaunchException;
+import org.apache.aurora.scheduler.async.OfferQueue.OfferQueueImpl;
+import org.apache.aurora.scheduler.async.OfferQueue.OfferReturnDelay;
+import org.apache.aurora.scheduler.events.PubsubEvent.DriverDisconnected;
+import org.apache.aurora.scheduler.state.MaintenanceController;
+
import org.apache.mesos.Protos.Offer;
import org.apache.mesos.Protos.TaskInfo;
+
import org.easymock.IAnswer;
+
import org.junit.Before;
import org.junit.Test;
-import com.twitter.aurora.gen.MaintenanceMode;
-import com.twitter.aurora.scheduler.Driver;
-import com.twitter.aurora.scheduler.async.OfferQueue.LaunchException;
-import com.twitter.aurora.scheduler.async.OfferQueue.OfferQueueImpl;
-import com.twitter.aurora.scheduler.async.OfferQueue.OfferReturnDelay;
-import com.twitter.aurora.scheduler.events.PubsubEvent.DriverDisconnected;
-import com.twitter.aurora.scheduler.state.MaintenanceController;
-import com.twitter.common.quantity.Amount;
-import com.twitter.common.quantity.Time;
-import com.twitter.common.testing.easymock.EasyMockTest;
-import com.twitter.common.util.concurrent.ExecutorServiceShutdown;
-
import static org.easymock.EasyMock.expect;
+
import static org.junit.Assert.assertFalse;
public class OfferQueueImplTest extends EasyMockTest {
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/scheduler/async/Offers.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/async/Offers.java b/src/test/java/org/apache/aurora/scheduler/async/Offers.java
index c727b3d..ca41637 100644
--- a/src/test/java/org/apache/aurora/scheduler/async/Offers.java
+++ b/src/test/java/org/apache/aurora/scheduler/async/Offers.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora.scheduler.async;
+package org.apache.aurora.scheduler.async;
import org.apache.mesos.Protos.FrameworkID;
import org.apache.mesos.Protos.Offer;
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/scheduler/async/PreemptorImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/async/PreemptorImplTest.java b/src/test/java/org/apache/aurora/scheduler/async/PreemptorImplTest.java
index 1e8eee2..a7b2986 100644
--- a/src/test/java/org/apache/aurora/scheduler/async/PreemptorImplTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/async/PreemptorImplTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora.scheduler.async;
+package org.apache.aurora.scheduler.async;
import java.util.Arrays;
import java.util.HashSet;
@@ -26,48 +26,51 @@ import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Lists;
+import com.twitter.common.quantity.Amount;
+import com.twitter.common.quantity.Data;
+import com.twitter.common.quantity.Time;
+import com.twitter.common.testing.easymock.EasyMockTest;
+import com.twitter.common.util.testing.FakeClock;
+
+import org.apache.aurora.gen.AssignedTask;
+import org.apache.aurora.gen.Attribute;
+import org.apache.aurora.gen.Constraint;
+import org.apache.aurora.gen.HostAttributes;
+import org.apache.aurora.gen.Identity;
+import org.apache.aurora.gen.ScheduleStatus;
+import org.apache.aurora.gen.ScheduledTask;
+import org.apache.aurora.gen.TaskConfig;
+import org.apache.aurora.gen.TaskEvent;
+import org.apache.aurora.scheduler.ResourceSlot;
+import org.apache.aurora.scheduler.base.Query;
+import org.apache.aurora.scheduler.base.Tasks;
+import org.apache.aurora.scheduler.configuration.Resources;
+import org.apache.aurora.scheduler.filter.SchedulingFilter;
+import org.apache.aurora.scheduler.filter.SchedulingFilterImpl;
+import org.apache.aurora.scheduler.state.MaintenanceController;
+import org.apache.aurora.scheduler.state.SchedulerCore;
+import org.apache.aurora.scheduler.storage.entities.IAssignedTask;
+import org.apache.aurora.scheduler.storage.entities.IScheduledTask;
+import org.apache.aurora.scheduler.storage.entities.ITaskConfig;
+import org.apache.aurora.scheduler.storage.testing.StorageTestUtil;
+
import org.easymock.EasyMock;
import org.easymock.IAnswer;
import org.easymock.IExpectationSetters;
+
import org.junit.Before;
import org.junit.Test;
-import com.twitter.aurora.gen.AssignedTask;
-import com.twitter.aurora.gen.Attribute;
-import com.twitter.aurora.gen.Constraint;
-import com.twitter.aurora.gen.HostAttributes;
-import com.twitter.aurora.gen.Identity;
-import com.twitter.aurora.gen.ScheduleStatus;
-import com.twitter.aurora.gen.ScheduledTask;
-import com.twitter.aurora.gen.TaskConfig;
-import com.twitter.aurora.gen.TaskEvent;
-import com.twitter.aurora.scheduler.ResourceSlot;
-import com.twitter.aurora.scheduler.base.Query;
-import com.twitter.aurora.scheduler.base.Tasks;
-import com.twitter.aurora.scheduler.configuration.Resources;
-import com.twitter.aurora.scheduler.filter.SchedulingFilter;
-import com.twitter.aurora.scheduler.filter.SchedulingFilterImpl;
-import com.twitter.aurora.scheduler.state.MaintenanceController;
-import com.twitter.aurora.scheduler.state.SchedulerCore;
-import com.twitter.aurora.scheduler.storage.entities.IAssignedTask;
-import com.twitter.aurora.scheduler.storage.entities.IScheduledTask;
-import com.twitter.aurora.scheduler.storage.entities.ITaskConfig;
-import com.twitter.aurora.scheduler.storage.testing.StorageTestUtil;
-import com.twitter.common.quantity.Amount;
-import com.twitter.common.quantity.Data;
-import com.twitter.common.quantity.Time;
-import com.twitter.common.testing.easymock.EasyMockTest;
-import com.twitter.common.util.testing.FakeClock;
+import static org.apache.aurora.gen.MaintenanceMode.NONE;
+import static org.apache.aurora.gen.ScheduleStatus.PENDING;
+import static org.apache.aurora.gen.ScheduleStatus.RUNNING;
+import static org.apache.aurora.scheduler.async.Preemptor.PreemptorImpl;
+import static org.apache.aurora.scheduler.filter.SchedulingFilter.Veto;
import static org.apache.mesos.Protos.Offer;
import static org.apache.mesos.Protos.Resource;
-import static org.easymock.EasyMock.expect;
-import static com.twitter.aurora.gen.MaintenanceMode.NONE;
-import static com.twitter.aurora.gen.ScheduleStatus.PENDING;
-import static com.twitter.aurora.gen.ScheduleStatus.RUNNING;
-import static com.twitter.aurora.scheduler.async.Preemptor.PreemptorImpl;
-import static com.twitter.aurora.scheduler.filter.SchedulingFilter.Veto;
+import static org.easymock.EasyMock.expect;
public class PreemptorImplTest extends EasyMockTest {
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/scheduler/async/TaskSchedulerImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/async/TaskSchedulerImplTest.java b/src/test/java/org/apache/aurora/scheduler/async/TaskSchedulerImplTest.java
index 5933f27..1004d0f 100644
--- a/src/test/java/org/apache/aurora/scheduler/async/TaskSchedulerImplTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/async/TaskSchedulerImplTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora.scheduler.async;
+package org.apache.aurora.scheduler.async;
import com.google.common.base.Function;
import com.google.common.base.Optional;
@@ -22,24 +22,6 @@ import com.google.inject.AbstractModule;
import com.google.inject.Guice;
import com.google.inject.Injector;
-import org.apache.mesos.Protos.Offer;
-import org.apache.mesos.Protos.TaskInfo;
-import org.easymock.Capture;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.twitter.aurora.gen.AssignedTask;
-import com.twitter.aurora.gen.Identity;
-import com.twitter.aurora.gen.ScheduledTask;
-import com.twitter.aurora.gen.TaskConfig;
-import com.twitter.aurora.scheduler.base.Query;
-import com.twitter.aurora.scheduler.events.PubsubEvent;
-import com.twitter.aurora.scheduler.state.PubsubTestUtil;
-import com.twitter.aurora.scheduler.state.StateManager;
-import com.twitter.aurora.scheduler.state.TaskAssigner;
-import com.twitter.aurora.scheduler.storage.Storage;
-import com.twitter.aurora.scheduler.storage.entities.IScheduledTask;
-import com.twitter.aurora.scheduler.storage.testing.StorageTestUtil;
import com.twitter.common.base.Closure;
import com.twitter.common.quantity.Amount;
import com.twitter.common.quantity.Time;
@@ -47,11 +29,32 @@ import com.twitter.common.testing.easymock.EasyMockTest;
import com.twitter.common.util.Clock;
import com.twitter.common.util.testing.FakeClock;
+import org.apache.aurora.gen.AssignedTask;
+import org.apache.aurora.gen.Identity;
+import org.apache.aurora.gen.ScheduledTask;
+import org.apache.aurora.gen.TaskConfig;
+import org.apache.aurora.scheduler.base.Query;
+import org.apache.aurora.scheduler.events.PubsubEvent;
+import org.apache.aurora.scheduler.state.PubsubTestUtil;
+import org.apache.aurora.scheduler.state.StateManager;
+import org.apache.aurora.scheduler.state.TaskAssigner;
+import org.apache.aurora.scheduler.storage.Storage;
+import org.apache.aurora.scheduler.storage.entities.IScheduledTask;
+import org.apache.aurora.scheduler.storage.testing.StorageTestUtil;
+
+import org.apache.mesos.Protos.Offer;
+import org.apache.mesos.Protos.TaskInfo;
+import org.easymock.Capture;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.apache.aurora.gen.ScheduleStatus.PENDING;
+
import static org.easymock.EasyMock.capture;
import static org.easymock.EasyMock.expect;
-import static org.junit.Assert.assertEquals;
-import static com.twitter.aurora.gen.ScheduleStatus.PENDING;
+import static org.junit.Assert.assertEquals;
public class TaskSchedulerImplTest extends EasyMockTest {
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/scheduler/async/TaskSchedulerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/async/TaskSchedulerTest.java b/src/test/java/org/apache/aurora/scheduler/async/TaskSchedulerTest.java
index c3fe726..5a3efe8 100644
--- a/src/test/java/org/apache/aurora/scheduler/async/TaskSchedulerTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/async/TaskSchedulerTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora.scheduler.async;
+package org.apache.aurora.scheduler.async;
import java.util.EnumSet;
import java.util.concurrent.ScheduledExecutorService;
@@ -27,67 +27,71 @@ import com.google.common.base.Optional;
import com.google.common.collect.ImmutableSet;
import com.google.common.util.concurrent.RateLimiter;
+import com.twitter.common.quantity.Amount;
+import com.twitter.common.quantity.Time;
+import com.twitter.common.testing.easymock.EasyMockTest;
+import com.twitter.common.util.BackoffStrategy;
+import com.twitter.common.util.testing.FakeClock;
+
+import org.apache.aurora.gen.AssignedTask;
+import org.apache.aurora.gen.HostStatus;
+import org.apache.aurora.gen.Identity;
+import org.apache.aurora.gen.MaintenanceMode;
+import org.apache.aurora.gen.ScheduleStatus;
+import org.apache.aurora.gen.ScheduledTask;
+import org.apache.aurora.gen.TaskConfig;
+import org.apache.aurora.gen.TaskEvent;
+import org.apache.aurora.scheduler.Driver;
+import org.apache.aurora.scheduler.async.OfferQueue.OfferQueueImpl;
+import org.apache.aurora.scheduler.async.OfferQueue.OfferReturnDelay;
+import org.apache.aurora.scheduler.async.RescheduleCalculator.RescheduleCalculatorImpl;
+import org.apache.aurora.scheduler.async.TaskScheduler.TaskSchedulerImpl;
+import org.apache.aurora.scheduler.base.Query;
+import org.apache.aurora.scheduler.base.Tasks;
+import org.apache.aurora.scheduler.events.PubsubEvent.HostMaintenanceStateChange;
+import org.apache.aurora.scheduler.events.PubsubEvent.StorageStarted;
+import org.apache.aurora.scheduler.events.PubsubEvent.TaskStateChange;
+import org.apache.aurora.scheduler.events.PubsubEvent.TasksDeleted;
+import org.apache.aurora.scheduler.state.MaintenanceController;
+import org.apache.aurora.scheduler.state.StateManager;
+import org.apache.aurora.scheduler.state.TaskAssigner;
+import org.apache.aurora.scheduler.storage.Storage;
+import org.apache.aurora.scheduler.storage.Storage.MutableStoreProvider;
+import org.apache.aurora.scheduler.storage.Storage.MutateWork;
+import org.apache.aurora.scheduler.storage.Storage.StorageException;
+import org.apache.aurora.scheduler.storage.TaskStore;
+import org.apache.aurora.scheduler.storage.entities.IScheduledTask;
+import org.apache.aurora.scheduler.storage.mem.MemStorage;
+
import org.apache.mesos.Protos.Offer;
import org.apache.mesos.Protos.OfferID;
import org.apache.mesos.Protos.SlaveID;
import org.apache.mesos.Protos.TaskID;
import org.apache.mesos.Protos.TaskInfo;
+
import org.easymock.Capture;
import org.easymock.EasyMock;
+
import org.junit.Before;
import org.junit.Test;
-import com.twitter.aurora.gen.AssignedTask;
-import com.twitter.aurora.gen.HostStatus;
-import com.twitter.aurora.gen.Identity;
-import com.twitter.aurora.gen.MaintenanceMode;
-import com.twitter.aurora.gen.ScheduleStatus;
-import com.twitter.aurora.gen.ScheduledTask;
-import com.twitter.aurora.gen.TaskConfig;
-import com.twitter.aurora.gen.TaskEvent;
-import com.twitter.aurora.scheduler.Driver;
-import com.twitter.aurora.scheduler.async.OfferQueue.OfferQueueImpl;
-import com.twitter.aurora.scheduler.async.OfferQueue.OfferReturnDelay;
-import com.twitter.aurora.scheduler.async.RescheduleCalculator.RescheduleCalculatorImpl;
-import com.twitter.aurora.scheduler.async.TaskScheduler.TaskSchedulerImpl;
-import com.twitter.aurora.scheduler.base.Query;
-import com.twitter.aurora.scheduler.base.Tasks;
-import com.twitter.aurora.scheduler.events.PubsubEvent.HostMaintenanceStateChange;
-import com.twitter.aurora.scheduler.events.PubsubEvent.StorageStarted;
-import com.twitter.aurora.scheduler.events.PubsubEvent.TaskStateChange;
-import com.twitter.aurora.scheduler.events.PubsubEvent.TasksDeleted;
-import com.twitter.aurora.scheduler.state.MaintenanceController;
-import com.twitter.aurora.scheduler.state.StateManager;
-import com.twitter.aurora.scheduler.state.TaskAssigner;
-import com.twitter.aurora.scheduler.storage.Storage;
-import com.twitter.aurora.scheduler.storage.Storage.MutableStoreProvider;
-import com.twitter.aurora.scheduler.storage.Storage.MutateWork;
-import com.twitter.aurora.scheduler.storage.Storage.StorageException;
-import com.twitter.aurora.scheduler.storage.TaskStore;
-import com.twitter.aurora.scheduler.storage.entities.IScheduledTask;
-import com.twitter.aurora.scheduler.storage.mem.MemStorage;
-import com.twitter.common.quantity.Amount;
-import com.twitter.common.quantity.Time;
-import com.twitter.common.testing.easymock.EasyMockTest;
-import com.twitter.common.util.BackoffStrategy;
-import com.twitter.common.util.testing.FakeClock;
+import static org.apache.aurora.gen.ScheduleStatus.ASSIGNED;
+import static org.apache.aurora.gen.ScheduleStatus.FAILED;
+import static org.apache.aurora.gen.ScheduleStatus.FINISHED;
+import static org.apache.aurora.gen.ScheduleStatus.INIT;
+import static org.apache.aurora.gen.ScheduleStatus.KILLED;
+import static org.apache.aurora.gen.ScheduleStatus.LOST;
+import static org.apache.aurora.gen.ScheduleStatus.PENDING;
+import static org.apache.aurora.gen.ScheduleStatus.RESTARTING;
+import static org.apache.aurora.gen.ScheduleStatus.RUNNING;
import static org.easymock.EasyMock.capture;
import static org.easymock.EasyMock.eq;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.expectLastCall;
import static org.easymock.EasyMock.isA;
-import static org.junit.Assert.assertEquals;
-import static com.twitter.aurora.gen.ScheduleStatus.ASSIGNED;
-import static com.twitter.aurora.gen.ScheduleStatus.FAILED;
-import static com.twitter.aurora.gen.ScheduleStatus.FINISHED;
-import static com.twitter.aurora.gen.ScheduleStatus.INIT;
-import static com.twitter.aurora.gen.ScheduleStatus.KILLED;
-import static com.twitter.aurora.gen.ScheduleStatus.LOST;
-import static com.twitter.aurora.gen.ScheduleStatus.PENDING;
-import static com.twitter.aurora.gen.ScheduleStatus.RESTARTING;
-import static com.twitter.aurora.gen.ScheduleStatus.RUNNING;
+import static org.junit.Assert.assertEquals;
/**
* TODO(wfarner): Break this test up to independently test TaskSchedulerImpl and OfferQueueImpl.
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/scheduler/async/TaskTimeoutTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/async/TaskTimeoutTest.java b/src/test/java/org/apache/aurora/scheduler/async/TaskTimeoutTest.java
index a06a1cf..9ad5f3b 100644
--- a/src/test/java/org/apache/aurora/scheduler/async/TaskTimeoutTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/async/TaskTimeoutTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora.scheduler.async;
+package org.apache.aurora.scheduler.async;
import java.util.Map;
import java.util.concurrent.ScheduledExecutorService;
@@ -25,46 +25,49 @@ import com.google.common.base.Supplier;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Maps;
+import com.twitter.common.quantity.Amount;
+import com.twitter.common.quantity.Time;
+import com.twitter.common.stats.StatsProvider;
+import com.twitter.common.testing.easymock.EasyMockTest;
+import com.twitter.common.util.testing.FakeClock;
+
+import org.apache.aurora.gen.AssignedTask;
+import org.apache.aurora.gen.ScheduleStatus;
+import org.apache.aurora.gen.ScheduledTask;
+import org.apache.aurora.gen.TaskConfig;
+import org.apache.aurora.gen.TaskEvent;
+import org.apache.aurora.scheduler.base.Query;
+import org.apache.aurora.scheduler.events.PubsubEvent.StorageStarted;
+import org.apache.aurora.scheduler.events.PubsubEvent.TaskStateChange;
+import org.apache.aurora.scheduler.state.StateManager;
+import org.apache.aurora.scheduler.storage.entities.IScheduledTask;
+import org.apache.aurora.scheduler.storage.testing.StorageTestUtil;
+
import org.easymock.Capture;
import org.easymock.EasyMock;
import org.easymock.IExpectationSetters;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import com.twitter.aurora.gen.AssignedTask;
-import com.twitter.aurora.gen.ScheduleStatus;
-import com.twitter.aurora.gen.ScheduledTask;
-import com.twitter.aurora.gen.TaskConfig;
-import com.twitter.aurora.gen.TaskEvent;
-import com.twitter.aurora.scheduler.base.Query;
-import com.twitter.aurora.scheduler.events.PubsubEvent.StorageStarted;
-import com.twitter.aurora.scheduler.events.PubsubEvent.TaskStateChange;
-import com.twitter.aurora.scheduler.state.StateManager;
-import com.twitter.aurora.scheduler.storage.entities.IScheduledTask;
-import com.twitter.aurora.scheduler.storage.testing.StorageTestUtil;
-import com.twitter.common.quantity.Amount;
-import com.twitter.common.quantity.Time;
-import com.twitter.common.stats.StatsProvider;
-import com.twitter.common.testing.easymock.EasyMockTest;
-import com.twitter.common.util.testing.FakeClock;
+import static org.apache.aurora.gen.ScheduleStatus.ASSIGNED;
+import static org.apache.aurora.gen.ScheduleStatus.FINISHED;
+import static org.apache.aurora.gen.ScheduleStatus.INIT;
+import static org.apache.aurora.gen.ScheduleStatus.KILLED;
+import static org.apache.aurora.gen.ScheduleStatus.KILLING;
+import static org.apache.aurora.gen.ScheduleStatus.LOST;
+import static org.apache.aurora.gen.ScheduleStatus.PENDING;
+import static org.apache.aurora.gen.ScheduleStatus.PREEMPTING;
+import static org.apache.aurora.gen.ScheduleStatus.RESTARTING;
+import static org.apache.aurora.gen.ScheduleStatus.RUNNING;
+import static org.apache.aurora.gen.ScheduleStatus.STARTING;
import static org.easymock.EasyMock.eq;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.expectLastCall;
-import static org.junit.Assert.assertEquals;
-import static com.twitter.aurora.gen.ScheduleStatus.ASSIGNED;
-import static com.twitter.aurora.gen.ScheduleStatus.FINISHED;
-import static com.twitter.aurora.gen.ScheduleStatus.INIT;
-import static com.twitter.aurora.gen.ScheduleStatus.KILLED;
-import static com.twitter.aurora.gen.ScheduleStatus.KILLING;
-import static com.twitter.aurora.gen.ScheduleStatus.LOST;
-import static com.twitter.aurora.gen.ScheduleStatus.PENDING;
-import static com.twitter.aurora.gen.ScheduleStatus.PREEMPTING;
-import static com.twitter.aurora.gen.ScheduleStatus.RESTARTING;
-import static com.twitter.aurora.gen.ScheduleStatus.RUNNING;
-import static com.twitter.aurora.gen.ScheduleStatus.STARTING;
+import static org.junit.Assert.assertEquals;
public class TaskTimeoutTest extends EasyMockTest {
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/scheduler/base/CommandUtilTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/base/CommandUtilTest.java b/src/test/java/org/apache/aurora/scheduler/base/CommandUtilTest.java
index 4e45c50..ff60353 100644
--- a/src/test/java/org/apache/aurora/scheduler/base/CommandUtilTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/base/CommandUtilTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora.scheduler.base;
+package org.apache.aurora.scheduler.base;
import java.util.Map;
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/scheduler/base/NumbersTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/base/NumbersTest.java b/src/test/java/org/apache/aurora/scheduler/base/NumbersTest.java
index 07b2740..a6eb74b 100644
--- a/src/test/java/org/apache/aurora/scheduler/base/NumbersTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/base/NumbersTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora.scheduler.base;
+package org.apache.aurora.scheduler.base;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/scheduler/configuration/ConfigurationManagerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/configuration/ConfigurationManagerTest.java b/src/test/java/org/apache/aurora/scheduler/configuration/ConfigurationManagerTest.java
index 309c144..039ed86 100644
--- a/src/test/java/org/apache/aurora/scheduler/configuration/ConfigurationManagerTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/configuration/ConfigurationManagerTest.java
@@ -13,33 +13,33 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora.scheduler.configuration;
+package org.apache.aurora.scheduler.configuration;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
+import org.apache.aurora.gen.Constraint;
+import org.apache.aurora.gen.CronCollisionPolicy;
+import org.apache.aurora.gen.ExecutorConfig;
+import org.apache.aurora.gen.Identity;
+import org.apache.aurora.gen.JobConfiguration;
+import org.apache.aurora.gen.JobKey;
+import org.apache.aurora.gen.LimitConstraint;
+import org.apache.aurora.gen.TaskConfig;
+import org.apache.aurora.gen.TaskConstraint;
+import org.apache.aurora.gen.ValueConstraint;
+
import org.junit.Test;
-import com.twitter.aurora.gen.Constraint;
-import com.twitter.aurora.gen.CronCollisionPolicy;
-import com.twitter.aurora.gen.ExecutorConfig;
-import com.twitter.aurora.gen.Identity;
-import com.twitter.aurora.gen.JobConfiguration;
-import com.twitter.aurora.gen.JobKey;
-import com.twitter.aurora.gen.LimitConstraint;
-import com.twitter.aurora.gen.TaskConfig;
-import com.twitter.aurora.gen.TaskConstraint;
-import com.twitter.aurora.gen.ValueConstraint;
+import static org.apache.aurora.gen.apiConstants.DEFAULT_ENVIRONMENT;
+import static org.apache.aurora.gen.test.testConstants.INVALID_IDENTIFIERS;
+import static org.apache.aurora.gen.test.testConstants.VALID_IDENTIFIERS;
+import static org.apache.aurora.scheduler.configuration.ConfigurationManager.isGoodIdentifier;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
-import static com.twitter.aurora.gen.apiConstants.DEFAULT_ENVIRONMENT;
-import static com.twitter.aurora.gen.test.testConstants.INVALID_IDENTIFIERS;
-import static com.twitter.aurora.gen.test.testConstants.VALID_IDENTIFIERS;
-import static com.twitter.aurora.scheduler.configuration.ConfigurationManager.isGoodIdentifier;
-
// TODO(Sathya): Improve test coverage for this class.
public class ConfigurationManagerTest {
// This job caused a crash when loaded in MESOS-3062
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/scheduler/configuration/ResourcesTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/configuration/ResourcesTest.java b/src/test/java/org/apache/aurora/scheduler/configuration/ResourcesTest.java
index 963106d..b16e4bb 100644
--- a/src/test/java/org/apache/aurora/scheduler/configuration/ResourcesTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/configuration/ResourcesTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora.scheduler.configuration;
+package org.apache.aurora.scheduler.configuration;
import java.util.Set;
@@ -21,17 +21,19 @@ import com.google.common.base.Function;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
+import com.twitter.common.collections.Pair;
+import com.twitter.common.quantity.Amount;
+import com.twitter.common.quantity.Data;
+
+import org.apache.aurora.scheduler.configuration.Resources.InsufficientResourcesException;
+
import org.apache.mesos.Protos;
import org.apache.mesos.Protos.Resource;
import org.apache.mesos.Protos.Value.Range;
import org.apache.mesos.Protos.Value.Ranges;
import org.apache.mesos.Protos.Value.Type;
-import org.junit.Test;
-import com.twitter.aurora.scheduler.configuration.Resources.InsufficientResourcesException;
-import com.twitter.common.collections.Pair;
-import com.twitter.common.quantity.Amount;
-import com.twitter.common.quantity.Data;
+import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/scheduler/cron/noop/NoopCronIT.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/cron/noop/NoopCronIT.java b/src/test/java/org/apache/aurora/scheduler/cron/noop/NoopCronIT.java
index b55c421..7991cb0 100644
--- a/src/test/java/org/apache/aurora/scheduler/cron/noop/NoopCronIT.java
+++ b/src/test/java/org/apache/aurora/scheduler/cron/noop/NoopCronIT.java
@@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora.scheduler.cron.noop;
+package org.apache.aurora.scheduler.cron.noop;
import com.google.inject.Guice;
import com.google.inject.Injector;
+import org.apache.aurora.scheduler.cron.CronPredictor;
+import org.apache.aurora.scheduler.cron.CronScheduler;
+
import org.junit.Before;
import org.junit.Test;
-import com.twitter.aurora.scheduler.cron.CronPredictor;
-import com.twitter.aurora.scheduler.cron.CronScheduler;
-
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/scheduler/events/NotifyingMethodInterceptorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/events/NotifyingMethodInterceptorTest.java b/src/test/java/org/apache/aurora/scheduler/events/NotifyingMethodInterceptorTest.java
index ceee118..93e9cc3 100644
--- a/src/test/java/org/apache/aurora/scheduler/events/NotifyingMethodInterceptorTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/events/NotifyingMethodInterceptorTest.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora.scheduler.events;
+package org.apache.aurora.scheduler.events;
import javax.inject.Singleton;
@@ -23,16 +23,17 @@ import com.google.inject.Injector;
import com.google.inject.TypeLiteral;
import com.google.inject.matcher.Matchers;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.twitter.aurora.scheduler.events.PubsubEvent.DriverRegistered;
-import com.twitter.aurora.scheduler.events.PubsubEvent.Interceptors.Event;
-import com.twitter.aurora.scheduler.events.PubsubEvent.Interceptors.SendNotification;
-import com.twitter.aurora.scheduler.events.PubsubEvent.StorageStarted;
import com.twitter.common.base.Closure;
import com.twitter.common.testing.easymock.EasyMockTest;
+import org.apache.aurora.scheduler.events.PubsubEvent.DriverRegistered;
+import org.apache.aurora.scheduler.events.PubsubEvent.Interceptors.Event;
+import org.apache.aurora.scheduler.events.PubsubEvent.Interceptors.SendNotification;
+import org.apache.aurora.scheduler.events.PubsubEvent.StorageStarted;
+
+import org.junit.Before;
+import org.junit.Test;
+
import static org.junit.Assert.assertEquals;
public class NotifyingMethodInterceptorTest extends EasyMockTest {
http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/cfb13f65/src/test/java/org/apache/aurora/scheduler/events/NotifyingSchedulingFilterTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/aurora/scheduler/events/NotifyingSchedulingFilterTest.java b/src/test/java/org/apache/aurora/scheduler/events/NotifyingSchedulingFilterTest.java
index 94498ef..21a5491 100644
--- a/src/test/java/org/apache/aurora/scheduler/events/NotifyingSchedulingFilterTest.java
+++ b/src/test/java/org/apache/aurora/scheduler/events/NotifyingSchedulingFilterTest.java
@@ -13,25 +13,27 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.twitter.aurora.scheduler.events;
+package org.apache.aurora.scheduler.events;
import java.util.Set;
import com.google.common.collect.ImmutableSet;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.twitter.aurora.gen.TaskConfig;
-import com.twitter.aurora.scheduler.ResourceSlot;
-import com.twitter.aurora.scheduler.events.PubsubEvent.Vetoed;
-import com.twitter.aurora.scheduler.filter.SchedulingFilter;
-import com.twitter.aurora.scheduler.filter.SchedulingFilter.Veto;
-import com.twitter.aurora.scheduler.storage.entities.ITaskConfig;
import com.twitter.common.base.Closure;
import com.twitter.common.testing.easymock.EasyMockTest;
+import org.apache.aurora.gen.TaskConfig;
+import org.apache.aurora.scheduler.ResourceSlot;
+import org.apache.aurora.scheduler.events.PubsubEvent.Vetoed;
+import org.apache.aurora.scheduler.filter.SchedulingFilter;
+import org.apache.aurora.scheduler.filter.SchedulingFilter.Veto;
+import org.apache.aurora.scheduler.storage.entities.ITaskConfig;
+
+import org.junit.Before;
+import org.junit.Test;
+
import static org.easymock.EasyMock.expect;
+
import static org.junit.Assert.assertEquals;
public class NotifyingSchedulingFilterTest extends EasyMockTest {