aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject git commit: Fixing checkstyle for tests.
Date Thu, 19 Dec 2013 00:18:07 GMT
Updated Branches:
  refs/heads/master f9739cc10 -> 4f1c62188


Fixing checkstyle for tests.


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/4f1c6218
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/4f1c6218
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/4f1c6218

Branch: refs/heads/master
Commit: 4f1c6218802e696c94049d3b96e23724f894cc2a
Parents: f9739cc
Author: Maxim Khutornenko <mkhutornenko@twitter.com>
Authored: Wed Dec 18 16:17:04 2013 -0800
Committer: Maxim Khutornenko <mkhutornenko@twitter.com>
Committed: Wed Dec 18 16:17:04 2013 -0800

----------------------------------------------------------------------
 build.gradle                                            |  2 +-
 .../twitter/aurora/scheduler/DriverFactoryImplTest.java | 12 +-----------
 .../aurora/scheduler/SchedulerLifecycleTest.java        |  1 -
 .../aurora/scheduler/async/TaskSchedulerImplTest.java   |  1 -
 .../aurora/scheduler/async/TaskSchedulerTest.java       |  6 ++----
 .../configuration/ConfigurationManagerTest.java         |  2 --
 .../scheduler/state/MaintenanceControllerImplTest.java  |  9 +++------
 7 files changed, 7 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/4f1c6218/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 92c42ce..d7525d2 100644
--- a/build.gradle
+++ b/build.gradle
@@ -173,7 +173,7 @@ dependencies {
 }
 
 checkstyle {
-  sourceSets = [ sourceSets.main ]
+  sourceSets = [ sourceSets.main , sourceSets.test]
 }
 
 def thriftBinary = 'build-support/thrift/thrift-0.9.1/compiler/cpp/thrift'

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/4f1c6218/src/test/java/com/twitter/aurora/scheduler/DriverFactoryImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/twitter/aurora/scheduler/DriverFactoryImplTest.java b/src/test/java/com/twitter/aurora/scheduler/DriverFactoryImplTest.java
index bb4b1c5..e8d9998 100644
--- a/src/test/java/com/twitter/aurora/scheduler/DriverFactoryImplTest.java
+++ b/src/test/java/com/twitter/aurora/scheduler/DriverFactoryImplTest.java
@@ -17,21 +17,11 @@ package com.twitter.aurora.scheduler;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileNotFoundException;
 import java.io.IOException;
-import java.io.Writer;
-import java.nio.charset.Charset;
 import java.util.Properties;
 
-import javax.inject.Provider;
-
-import com.google.common.base.Charsets;
-import com.google.common.io.Files;
 import com.google.common.base.Throwables;
 
-import org.apache.mesos.Scheduler;
-import org.junit.Before;
 import org.junit.Test;
 
 import com.twitter.aurora.scheduler.DriverFactory.DriverFactoryImpl;
@@ -41,7 +31,7 @@ import static org.junit.Assert.assertEquals;
 
 public class DriverFactoryImplTest extends EasyMockTest {
 
-  @Test(expected=IllegalStateException.class)
+  @Test(expected = IllegalStateException.class)
   public void testMissingPropertiesParsing() {
     Properties testProperties = new Properties();
     testProperties.put(DriverFactoryImpl.PRINCIPAL_KEY, "aurora-scheduler");

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/4f1c6218/src/test/java/com/twitter/aurora/scheduler/SchedulerLifecycleTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/twitter/aurora/scheduler/SchedulerLifecycleTest.java b/src/test/java/com/twitter/aurora/scheduler/SchedulerLifecycleTest.java
index 3336875..a748e6c 100644
--- a/src/test/java/com/twitter/aurora/scheduler/SchedulerLifecycleTest.java
+++ b/src/test/java/com/twitter/aurora/scheduler/SchedulerLifecycleTest.java
@@ -38,7 +38,6 @@ import com.twitter.common.zookeeper.SingletonService.LeadershipListener;
 
 import static org.easymock.EasyMock.capture;
 import static org.easymock.EasyMock.expect;
-import static org.junit.Assert.assertSame;
 import static org.junit.Assert.fail;
 
 public class SchedulerLifecycleTest extends EasyMockTest {

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/4f1c6218/src/test/java/com/twitter/aurora/scheduler/async/TaskSchedulerImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/twitter/aurora/scheduler/async/TaskSchedulerImplTest.java b/src/test/java/com/twitter/aurora/scheduler/async/TaskSchedulerImplTest.java
index 4bdf0ff..5933f27 100644
--- a/src/test/java/com/twitter/aurora/scheduler/async/TaskSchedulerImplTest.java
+++ b/src/test/java/com/twitter/aurora/scheduler/async/TaskSchedulerImplTest.java
@@ -21,7 +21,6 @@ import com.google.common.collect.ImmutableSet;
 import com.google.inject.AbstractModule;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
-import com.google.inject.TypeLiteral;
 
 import org.apache.mesos.Protos.Offer;
 import org.apache.mesos.Protos.TaskInfo;

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/4f1c6218/src/test/java/com/twitter/aurora/scheduler/async/TaskSchedulerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/twitter/aurora/scheduler/async/TaskSchedulerTest.java b/src/test/java/com/twitter/aurora/scheduler/async/TaskSchedulerTest.java
index 4773a96..c3fe726 100644
--- a/src/test/java/com/twitter/aurora/scheduler/async/TaskSchedulerTest.java
+++ b/src/test/java/com/twitter/aurora/scheduler/async/TaskSchedulerTest.java
@@ -49,7 +49,6 @@ 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.RescheduleCalculator.RescheduleCalculatorImpl.RescheduleCalculatorSettings;
 import com.twitter.aurora.scheduler.async.TaskScheduler.TaskSchedulerImpl;
 import com.twitter.aurora.scheduler.base.Query;
 import com.twitter.aurora.scheduler.base.Tasks;
@@ -111,7 +110,6 @@ public class TaskSchedulerTest extends EasyMockTest {
   private OfferReturnDelay returnDelay;
   private OfferQueue offerQueue;
   private TaskGroups taskGroups;
-  private TaskScheduler scheduler;
   private FakeClock clock;
   private BackoffStrategy flappingStrategy;
   private Preemptor preemptor;
@@ -139,7 +137,7 @@ public class TaskSchedulerTest extends EasyMockTest {
     offerQueue = new OfferQueueImpl(driver, returnDelay, executor, maintenance);
     RateLimiter rateLimiter = RateLimiter.create(1);
     Amount<Long, Time> flappingThreshold = Amount.of(5L, Time.MINUTES);
-    scheduler = new TaskSchedulerImpl(storage,
+    TaskScheduler scheduler = new TaskSchedulerImpl(storage,
         stateManager,
         assigner,
         offerQueue,
@@ -155,7 +153,7 @@ public class TaskSchedulerTest extends EasyMockTest {
         clock,
         new RescheduleCalculatorImpl(
             storage,
-            new RescheduleCalculatorSettings(
+            new RescheduleCalculatorImpl.RescheduleCalculatorSettings(
                 flappingStrategy,
                 flappingThreshold,
                 Amount.of(5, Time.SECONDS)),

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/4f1c6218/src/test/java/com/twitter/aurora/scheduler/configuration/ConfigurationManagerTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/twitter/aurora/scheduler/configuration/ConfigurationManagerTest.java
b/src/test/java/com/twitter/aurora/scheduler/configuration/ConfigurationManagerTest.java
index ec9c21c..309c144 100644
--- a/src/test/java/com/twitter/aurora/scheduler/configuration/ConfigurationManagerTest.java
+++ b/src/test/java/com/twitter/aurora/scheduler/configuration/ConfigurationManagerTest.java
@@ -30,12 +30,10 @@ 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 com.twitter.aurora.scheduler.storage.entities.IJobConfiguration;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
 
 import static com.twitter.aurora.gen.apiConstants.DEFAULT_ENVIRONMENT;
 import static com.twitter.aurora.gen.test.testConstants.INVALID_IDENTIFIERS;

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/4f1c6218/src/test/java/com/twitter/aurora/scheduler/state/MaintenanceControllerImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/com/twitter/aurora/scheduler/state/MaintenanceControllerImplTest.java
b/src/test/java/com/twitter/aurora/scheduler/state/MaintenanceControllerImplTest.java
index e6e60bf..52cdda0 100644
--- a/src/test/java/com/twitter/aurora/scheduler/state/MaintenanceControllerImplTest.java
+++ b/src/test/java/com/twitter/aurora/scheduler/state/MaintenanceControllerImplTest.java
@@ -15,14 +15,10 @@
  */
 package com.twitter.aurora.scheduler.state;
 
-import java.util.HashSet;
 import java.util.Set;
 
 import com.google.common.base.Optional;
-import com.google.common.collect.ArrayListMultimap;
 import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Multimap;
-import com.google.common.collect.Sets;
 import com.google.inject.AbstractModule;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
@@ -48,6 +44,9 @@ import com.twitter.aurora.scheduler.storage.testing.StorageTestUtil;
 import com.twitter.common.base.Closure;
 import com.twitter.common.testing.easymock.EasyMockTest;
 
+import static org.easymock.EasyMock.expect;
+import static org.junit.Assert.assertEquals;
+
 import static com.twitter.aurora.gen.MaintenanceMode.DRAINED;
 import static com.twitter.aurora.gen.MaintenanceMode.DRAINING;
 import static com.twitter.aurora.gen.MaintenanceMode.NONE;
@@ -55,8 +54,6 @@ import static com.twitter.aurora.gen.MaintenanceMode.SCHEDULED;
 import static com.twitter.aurora.gen.ScheduleStatus.FINISHED;
 import static com.twitter.aurora.gen.ScheduleStatus.RUNNING;
 import static com.twitter.aurora.scheduler.state.MaintenanceController.MaintenanceControllerImpl;
-import static org.easymock.EasyMock.expect;
-import static org.junit.Assert.assertEquals;
 
 public class MaintenanceControllerImplTest extends EasyMockTest {
 


Mime
View raw message