Repository: aurora Updated Branches: refs/heads/master 97520ba4d -> 013ba6ffa
http://git-wip-us.apache.org/repos/asf/aurora/blob/013ba6ff/src/test/java/org/apache/aurora/scheduler/storage/db/RowGarbageCollectorTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/aurora/scheduler/storage/db/RowGarbageCollectorTest.java b/src/test/java/org/apache/aurora/scheduler/storage/db/RowGarbageCollectorTest.java index 85b6a35..00bf3b7 100644 --- a/src/test/java/org/apache/aurora/scheduler/storage/db/RowGarbageCollectorTest.java +++ b/src/test/java/org/apache/aurora/scheduler/storage/db/RowGarbageCollectorTest.java @@ -26,7 +26,6 @@ import org.apache.aurora.gen.JobKey; import org.apache.aurora.scheduler.base.TaskTestUtil; import org.apache.aurora.scheduler.storage.Storage; import org.apache.aurora.scheduler.storage.db.views.ScheduledTaskWrapper; -import org.apache.aurora.scheduler.storage.db.views.TaskConfigRow; import org.apache.aurora.scheduler.storage.entities.IJobKey; import org.apache.aurora.scheduler.storage.entities.IScheduledTask; import org.apache.aurora.scheduler.storage.entities.ITaskConfig; @@ -79,15 +78,15 @@ public class RowGarbageCollectorTest { @Test public void testGarbageCollection() { rowGc.runOneIteration(); - assertEquals(ImmutableList.<JobKey>of(), jobKeyMapper.selectAll()); - assertEquals(ImmutableList.<TaskConfigRow>of(), taskConfigMapper.selectConfigsByJob(JOB_A)); - assertEquals(ImmutableList.<TaskConfigRow>of(), taskConfigMapper.selectConfigsByJob(JOB_B)); + assertEquals(ImmutableList.of(), jobKeyMapper.selectAll()); + assertEquals(ImmutableList.of(), taskConfigMapper.selectConfigsByJob(JOB_A)); + assertEquals(ImmutableList.of(), taskConfigMapper.selectConfigsByJob(JOB_B)); jobKeyMapper.merge(JOB_A); rowGc.runOneIteration(); - assertEquals(ImmutableList.<JobKey>of(), jobKeyMapper.selectAll()); - assertEquals(ImmutableList.<TaskConfigRow>of(), taskConfigMapper.selectConfigsByJob(JOB_A)); - assertEquals(ImmutableList.<TaskConfigRow>of(), taskConfigMapper.selectConfigsByJob(JOB_B)); + assertEquals(ImmutableList.of(), jobKeyMapper.selectAll()); + assertEquals(ImmutableList.of(), taskConfigMapper.selectConfigsByJob(JOB_A)); + assertEquals(ImmutableList.of(), taskConfigMapper.selectConfigsByJob(JOB_B)); jobKeyMapper.merge(JOB_A); taskConfigMapper.insert(CONFIG_A, new InsertResult()); @@ -106,6 +105,6 @@ public class RowGarbageCollectorTest { TASK_A2.getAssignedTask().getTask().getRamMb(), Iterables.getOnlyElement(taskConfigMapper.selectConfigsByJob(JOB_A)) .getConfig().getRamMb()); - assertEquals(ImmutableList.<TaskConfigRow>of(), taskConfigMapper.selectConfigsByJob(JOB_B)); + assertEquals(ImmutableList.of(), taskConfigMapper.selectConfigsByJob(JOB_B)); } } http://git-wip-us.apache.org/repos/asf/aurora/blob/013ba6ff/src/test/java/org/apache/aurora/scheduler/storage/log/LogManagerTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/aurora/scheduler/storage/log/LogManagerTest.java b/src/test/java/org/apache/aurora/scheduler/storage/log/LogManagerTest.java index d4aaa67..751e49b 100644 --- a/src/test/java/org/apache/aurora/scheduler/storage/log/LogManagerTest.java +++ b/src/test/java/org/apache/aurora/scheduler/storage/log/LogManagerTest.java @@ -55,7 +55,6 @@ 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.base.JobKeys; -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; @@ -115,7 +114,7 @@ public class LogManagerTest extends EasyMockTest { @Test public void testStreamManagerReadFromUnknownNone() throws CodingException { - expect(stream.readAll()).andReturn(Iterators.<Log.Entry>emptyIterator()); + expect(stream.readAll()).andReturn(Iterators.emptyIterator()); Closure<LogEntry> reader = createMock(new Clazz<Closure<LogEntry>>() { }); http://git-wip-us.apache.org/repos/asf/aurora/blob/013ba6ff/src/test/java/org/apache/aurora/scheduler/storage/log/LogStorageTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/aurora/scheduler/storage/log/LogStorageTest.java b/src/test/java/org/apache/aurora/scheduler/storage/log/LogStorageTest.java index e455946..eabce16 100644 --- a/src/test/java/org/apache/aurora/scheduler/storage/log/LogStorageTest.java +++ b/src/test/java/org/apache/aurora/scheduler/storage/log/LogStorageTest.java @@ -390,7 +390,7 @@ public class LogStorageTest extends EasyMockTest { expect(entry.contents()).andReturn(ThriftBinaryCodec.encodeNonNull(logEntry)); } - storageUtil.storage.bulkLoad(EasyMock.<MutateWork.NoResult<?>>anyObject()); + storageUtil.storage.bulkLoad(EasyMock.anyObject()); expectLastCall().andAnswer(new IAnswer<MutateWork.NoResult<?>>() { @Override public NoResult<?> answer() throws Throwable { @@ -444,7 +444,7 @@ public class LogStorageTest extends EasyMockTest { } }); - storageUtil.storage.bulkLoad(EasyMock.<MutateWork.NoResult<?>>anyObject()); + storageUtil.storage.bulkLoad(EasyMock.anyObject()); expectLastCall().andAnswer(new IAnswer<MutateWork.NoResult<?>>() { @Override public NoResult<?> answer() throws Throwable { @@ -453,7 +453,7 @@ public class LogStorageTest extends EasyMockTest { return null; } }); - expect(stream.readAll()).andReturn(Iterators.<Entry>emptyIterator()); + expect(stream.readAll()).andReturn(Iterators.emptyIterator()); final Capture<MutateWork<Void, RuntimeException>> recoveryWork = createCapture(); expect(storageUtil.storage.write(capture(recoveryWork))).andAnswer( new IAnswer<Void>() { @@ -865,7 +865,7 @@ public class LogStorageTest extends EasyMockTest { protected void setupExpectations() throws Exception { storageUtil.expectWrite(); expect(storageUtil.attributeStore.getHostAttributes(host)) - .andReturn(Optional.<IHostAttributes>absent()); + .andReturn(Optional.absent()); expect(storageUtil.attributeStore.getHostAttributes(host)).andReturn(hostAttributes); @@ -884,7 +884,7 @@ public class LogStorageTest extends EasyMockTest { @Override protected void performMutations(MutableStoreProvider storeProvider) { AttributeStore.Mutable store = storeProvider.getAttributeStore(); - assertEquals(Optional.<IHostAttributes>absent(), store.getHostAttributes(host)); + assertEquals(Optional.absent(), store.getHostAttributes(host)); assertTrue(store.saveHostAttributes(hostAttributes.get())); @@ -904,7 +904,7 @@ public class LogStorageTest extends EasyMockTest { @Test public void testSaveUpdateWithNullLockToken() throws Exception { - saveAndAssertJobUpdate(Optional.<String>absent()); + saveAndAssertJobUpdate(Optional.absent()); } private void saveAndAssertJobUpdate(final Optional<String> lockToken) http://git-wip-us.apache.org/repos/asf/aurora/blob/013ba6ff/src/test/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImplTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImplTest.java b/src/test/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImplTest.java index c183acf..20b2ff8 100644 --- a/src/test/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImplTest.java +++ b/src/test/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImplTest.java @@ -95,7 +95,7 @@ public class SnapshotStoreImplTest extends EasyMockTest { // A legacy attribute that has a maintenance mode set, but nothing else. These should be // dropped. IHostAttributes legacyAttribute = IHostAttributes.build( - new HostAttributes("host", ImmutableSet.<Attribute>of())); + new HostAttributes("host", ImmutableSet.of())); StoredCronJob job = new StoredCronJob( new JobConfiguration().setKey(new JobKey("owner", "env", "name"))); String frameworkId = "framework_id"; @@ -155,7 +155,7 @@ public class SnapshotStoreImplTest extends EasyMockTest { JobUpdate update2Expected = updateDetails2.getUpdate().newBuilder(); update2Expected.getSummary().setKey(updateId2.newBuilder()); storageUtil.jobUpdateStore.saveJobUpdate( - IJobUpdate.build(update2Expected), Optional.<String>absent()); + IJobUpdate.build(update2Expected), Optional.absent()); control.replay(); http://git-wip-us.apache.org/repos/asf/aurora/blob/013ba6ff/src/test/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorageTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorageTest.java b/src/test/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorageTest.java index 4d447d3..f1bcba4 100644 --- a/src/test/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorageTest.java +++ b/src/test/java/org/apache/aurora/scheduler/storage/log/WriteAheadStorageTest.java @@ -115,7 +115,7 @@ public class WriteAheadStorageTest extends EasyMockTest { @Test public void testNoopPruneHistory() { - expect(jobUpdateStore.pruneHistory(1, 1)).andReturn(ImmutableSet.<IJobUpdateKey>of()); + expect(jobUpdateStore.pruneHistory(1, 1)).andReturn(ImmutableSet.of()); control.replay(); http://git-wip-us.apache.org/repos/asf/aurora/blob/013ba6ff/src/test/java/org/apache/aurora/scheduler/storage/mem/StorageTransactionTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/aurora/scheduler/storage/mem/StorageTransactionTest.java b/src/test/java/org/apache/aurora/scheduler/storage/mem/StorageTransactionTest.java index e5e889a..4ae194c 100644 --- a/src/test/java/org/apache/aurora/scheduler/storage/mem/StorageTransactionTest.java +++ b/src/test/java/org/apache/aurora/scheduler/storage/mem/StorageTransactionTest.java @@ -160,7 +160,7 @@ public class StorageTransactionTest extends TearDownTestCase { @Override public Void apply(StoreProvider storeProvider) { // If the previous write was under a transaction then there would be no quota records. - assertEquals(ImmutableMap.<String, IResourceAggregate>of(), + assertEquals(ImmutableMap.of(), storeProvider.getQuotaStore().fetchQuotas()); return null; } http://git-wip-us.apache.org/repos/asf/aurora/blob/013ba6ff/src/test/java/org/apache/aurora/scheduler/testing/FakeScheduledExecutor.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/aurora/scheduler/testing/FakeScheduledExecutor.java b/src/test/java/org/apache/aurora/scheduler/testing/FakeScheduledExecutor.java index 916483b..e198c1c 100644 --- a/src/test/java/org/apache/aurora/scheduler/testing/FakeScheduledExecutor.java +++ b/src/test/java/org/apache/aurora/scheduler/testing/FakeScheduledExecutor.java @@ -48,10 +48,10 @@ public final class FakeScheduledExecutor extends FakeClock { mock.schedule( EasyMock.<Runnable>anyObject(), EasyMock.anyLong(), - EasyMock.<TimeUnit>anyObject()); + EasyMock.anyObject()); expectLastCall().andAnswer(answerSchedule(executor)).anyTimes(); - mock.execute(EasyMock.<Runnable>anyObject()); + mock.execute(EasyMock.anyObject()); expectLastCall().andAnswer(answerExecute()).anyTimes(); return executor; @@ -101,10 +101,10 @@ public final class FakeScheduledExecutor extends FakeClock { FakeScheduledExecutor executor = new FakeScheduledExecutor(); mock.scheduleAtFixedRate( - EasyMock.<Runnable>anyObject(), + EasyMock.anyObject(), EasyMock.anyLong(), EasyMock.anyLong(), - EasyMock.<TimeUnit>anyObject()); + EasyMock.anyObject()); expectLastCall() .andAnswer(answerScheduleAtFixedRate(executor, maxInvocations)) .times(maxSchedules); http://git-wip-us.apache.org/repos/asf/aurora/blob/013ba6ff/src/test/java/org/apache/aurora/scheduler/thrift/Fixtures.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/aurora/scheduler/thrift/Fixtures.java b/src/test/java/org/apache/aurora/scheduler/thrift/Fixtures.java index 48179b8..e0110e7 100644 --- a/src/test/java/org/apache/aurora/scheduler/thrift/Fixtures.java +++ b/src/test/java/org/apache/aurora/scheduler/thrift/Fixtures.java @@ -123,8 +123,8 @@ final class Fixtures { .setRamMb(1024) .setDiskMb(1024) .setProduction(production) - .setRequestedPorts(ImmutableSet.<String>of()) - .setTaskLinks(ImmutableMap.<String, String>of()) + .setRequestedPorts(ImmutableSet.of()) + .setTaskLinks(ImmutableMap.of()) .setMaxTaskFailures(1) .setContainer(Container.mesos(new MesosContainer())); } http://git-wip-us.apache.org/repos/asf/aurora/blob/013ba6ff/src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java b/src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java index 4786bea..ddabb4c 100644 --- a/src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java +++ b/src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java @@ -195,7 +195,7 @@ public class ReadOnlySchedulerImplTest extends EasyMockTest { .andReturn(IJobConfiguration.setFromBuilders(unownedCronJobOnly)); storageUtil.expectTaskFetch(query); - expect(storageUtil.jobStore.fetchJobs()).andReturn(ImmutableSet.<IJobConfiguration>of()); + expect(storageUtil.jobStore.fetchJobs()).andReturn(ImmutableSet.of()); // Handle the case where a cron job has a running task (same JobKey present in both stores). storageUtil.expectTaskFetch(query, ownedCronJobScheduledTask); @@ -216,7 +216,7 @@ public class ReadOnlySchedulerImplTest extends EasyMockTest { .getJob() .getTaskConfig()); - assertEquals(jobSummaryResponse(ImmutableSet.<JobSummary>of()), thrift.getJobSummary(ROLE)); + assertEquals(jobSummaryResponse(ImmutableSet.of()), thrift.getJobSummary(ROLE)); assertEquals(jobSummaryResponse(ownedCronJobSummaryWithRunningTask), thrift.getJobSummary(ROLE)); @@ -418,7 +418,7 @@ public class ReadOnlySchedulerImplTest extends EasyMockTest { expect(storageUtil.jobStore.fetchJobs()) .andReturn(IJobConfiguration.setFromBuilders(unownedCronJobOnly)); - expect(storageUtil.jobStore.fetchJobs()).andReturn(ImmutableSet.<IJobConfiguration>of()); + expect(storageUtil.jobStore.fetchJobs()).andReturn(ImmutableSet.of()); storageUtil.expectTaskFetch(query); // Handle the case where a cron job has a running task (same JobKey present in both stores). @@ -658,11 +658,11 @@ public class ReadOnlySchedulerImplTest extends EasyMockTest { public void testEmptyConfigSummary() throws Exception { IJobKey key = JobKeys.from("test", "test", "test"); - storageUtil.expectTaskFetch(Query.jobScoped(key).active(), ImmutableSet.<IScheduledTask>of()); + storageUtil.expectTaskFetch(Query.jobScoped(key).active(), ImmutableSet.of()); ConfigSummary summary = new ConfigSummary() .setKey(key.newBuilder()) - .setGroups(Sets.<ConfigGroup>newHashSet()); + .setGroups(Sets.newHashSet()); ConfigSummaryResult expected = new ConfigSummaryResult().setSummary(summary); @@ -675,7 +675,7 @@ public class ReadOnlySchedulerImplTest extends EasyMockTest { @Test public void testGetJobUpdateDetailsInvalidId() throws Exception { expect(storageUtil.jobUpdateStore.fetchJobUpdateDetails(UPDATE_KEY)) - .andReturn(Optional.<IJobUpdateDetails>absent()); + .andReturn(Optional.absent()); control.replay(); http://git-wip-us.apache.org/repos/asf/aurora/blob/013ba6ff/src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java b/src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java index be9a64f..a5ca21b 100644 --- a/src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java +++ b/src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java @@ -101,7 +101,6 @@ import org.apache.aurora.scheduler.storage.entities.IInstanceKey; import org.apache.aurora.scheduler.storage.entities.IJobConfiguration; import org.apache.aurora.scheduler.storage.entities.IJobKey; import org.apache.aurora.scheduler.storage.entities.IJobUpdate; -import org.apache.aurora.scheduler.storage.entities.ILock; import org.apache.aurora.scheduler.storage.entities.ILockKey; import org.apache.aurora.scheduler.storage.entities.IRange; import org.apache.aurora.scheduler.storage.entities.IResourceAggregate; @@ -268,7 +267,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { IJobConfiguration job = IJobConfiguration.build(makeProdJob()); SanitizedConfiguration sanitized = SanitizedConfiguration.fromUnsanitized(job); expectAuth(ROLE, true); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); storageUtil.expectTaskFetch(Query.jobScoped(JOB_KEY).active()); expectNoCronJob(); expect(taskIdGenerator.generate(sanitized.getJobConfig().getTaskConfig(), 1)) @@ -357,7 +356,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { public void testCreateJobFailsJobExists() throws Exception { IJobConfiguration job = IJobConfiguration.build(makeJob()); expectAuth(ROLE, true); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); storageUtil.expectTaskFetch(Query.jobScoped(JOB_KEY).active(), buildScheduledTask()); control.replay(); @@ -369,7 +368,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { public void testCreateJobFailsCronJobExists() throws Exception { IJobConfiguration job = IJobConfiguration.build(makeJob()); expectAuth(ROLE, true); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); storageUtil.expectTaskFetch(Query.jobScoped(JOB_KEY).active()); expectCronJob(); @@ -384,7 +383,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { makeJob(defaultTask(true), MAX_TASKS_PER_JOB.get() + 1)); expectAuth(ROLE, true); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); storageUtil.expectTaskFetch(Query.jobScoped(JOB_KEY).active()); expectNoCronJob(); expect(quotaManager.checkInstanceAddition( @@ -402,7 +401,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { IJobConfiguration job = IJobConfiguration.build(makeJob()); SanitizedConfiguration sanitized = SanitizedConfiguration.fromUnsanitized(job); expectAuth(ROLE, true); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); storageUtil.expectTaskFetch(Query.jobScoped(JOB_KEY).active()); expectNoCronJob(); expect(quotaManager.checkInstanceAddition( @@ -423,7 +422,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { IJobConfiguration job = IJobConfiguration.build(makeProdJob()); SanitizedConfiguration sanitized = SanitizedConfiguration.fromUnsanitized(job); expectAuth(ROLE, true); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); storageUtil.expectTaskFetch(Query.jobScoped(JOB_KEY).active()); expectNoCronJob(); expect(taskIdGenerator.generate(sanitized.getJobConfig().getTaskConfig(), 1)) @@ -558,13 +557,13 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { .setDiskMb(1024) .setIsService(true) .setProduction(true) - .setRequestedPorts(ImmutableSet.<String>of()) - .setTaskLinks(ImmutableMap.<String, String>of()) + .setRequestedPorts(ImmutableSet.of()) + .setTaskLinks(ImmutableMap.of()) .setConstraints(ImmutableSet.of()) .setMaxTaskFailures(1) .setEnvironment("devel"); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); storageUtil.expectTaskFetch(Query.jobScoped(JOB_KEY).active()); expectNoCronJob(); expect(taskIdGenerator.generate(ITaskConfig.build(sanitized.getTaskConfig()), 1)) @@ -646,7 +645,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { expect(stateManager.changeState( storageUtil.mutableStoreProvider, TASK_ID, - Optional.<ScheduleStatus>absent(), + Optional.absent(), ScheduleStatus.KILLING, killedByMessage(USER))).andReturn(StateChangeResult.SUCCESS); } @@ -670,7 +669,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { Query.Builder query = Query.unscoped().byJob(JOB_KEY).active(); expectAuth(ROOT, true); storageUtil.expectTaskFetch(query, buildScheduledTask()); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); expectTransitionsToKilling(); control.replay(); @@ -683,7 +682,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { TaskQuery query = new TaskQuery().setJobName("job"); expectAuth(ROOT, true); storageUtil.expectTaskFetch(Query.arbitrary(query).active(), buildScheduledTask()); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); expectTransitionsToKilling(); control.replay(); @@ -696,7 +695,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { Query.Builder query = Query.unscoped().byJob(JOB_KEY); expectAuth(ROOT, true); storageUtil.expectTaskFetch(query.active(), buildScheduledTask()); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); expectTransitionsToKilling(); control.replay(); @@ -731,7 +730,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { // This query happens twice - once for authentication (without consistency) and once again // to perform the state change (within a write transaction). storageUtil.expectTaskFetch(query.active(), buildScheduledTask()).times(2); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); expectTransitionsToKilling(); control.replay(); @@ -761,7 +760,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { expectAuth(ROOT, false); expectAuth(ImmutableSet.of("a", "b"), true); storageUtil.expectTaskFetch(query.active(), buildScheduledTask()); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); expectTransitionsToKilling(); control.replay(); @@ -812,7 +811,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { Query.Builder query = Query.roleScoped("foo").active(); storageUtil.expectTaskFetch(query, buildScheduledTask()); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); expectTransitionsToKilling(); control.replay(); @@ -876,7 +875,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { expect(stateManager.changeState( storageUtil.mutableStoreProvider, TASK_ID, - Optional.<ScheduleStatus>absent(), + Optional.absent(), ScheduleStatus.FAILED, Optional.of(transitionMessage(USER).get()))).andReturn(StateChangeResult.SUCCESS); @@ -887,7 +886,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { assertOkResponse(thrift.forceTaskState(TASK_ID, status, SESSION)); assertEquals( - response(AUTH_FAILED, Optional.<Result>absent(), AUTH_DENIED_MESSAGE), + response(AUTH_FAILED, Optional.absent(), AUTH_DENIED_MESSAGE), thrift.forceTaskState(TASK_ID, status, SESSION)); } @@ -974,7 +973,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { expect(stateManager.changeState( storageUtil.mutableStoreProvider, TASK_ID, - Optional.<ScheduleStatus>absent(), + Optional.absent(), ScheduleStatus.RESTARTING, restartedByMessage(USER))).andReturn(StateChangeResult.SUCCESS); @@ -1028,7 +1027,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { @Test public void testReplaceCronTemplate() throws Exception { expectAuth(ROLE, true); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); SanitizedConfiguration sanitized = SanitizedConfiguration.fromUnsanitized(IJobConfiguration.build(CRON_JOB)); @@ -1056,7 +1055,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { @Test public void testReplaceCronTemplateFailedLockValidation() throws Exception { expectAuth(ROLE, true); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); expectLastCall().andThrow(new LockException("Failed lock.")); control.replay(); @@ -1066,7 +1065,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { @Test public void testReplaceCronTemplateDoesNotExist() throws Exception { expectAuth(ROLE, true); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); SanitizedConfiguration sanitized = SanitizedConfiguration.fromUnsanitized(IJobConfiguration.build(CRON_JOB)); @@ -1108,7 +1107,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { @Test public void testScheduleCronCreatesJob() throws Exception { expectAuth(ROLE, true); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); SanitizedConfiguration sanitized = SanitizedConfiguration.fromUnsanitized(IJobConfiguration.build(CRON_JOB)); @@ -1126,7 +1125,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { @Test public void testScheduleCronFailsCreationDueToExistingNonCron() throws Exception { expectAuth(ROLE, true); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); SanitizedConfiguration sanitized = SanitizedConfiguration.fromUnsanitized(IJobConfiguration.build(CRON_JOB)); @@ -1145,7 +1144,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { @Test public void testScheduleCronUpdatesJob() throws Exception { expectAuth(ROLE, true); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); SanitizedConfiguration sanitized = SanitizedConfiguration.fromUnsanitized(IJobConfiguration.build(CRON_JOB)); @@ -1202,7 +1201,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { @Test public void testScheduleCronFailsQuotaCheck() throws Exception { expectAuth(ROLE, true); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); SanitizedConfiguration sanitized = SanitizedConfiguration.fromUnsanitized(IJobConfiguration.build(CRON_JOB)); @@ -1217,7 +1216,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { @Test public void testDescheduleCronJob() throws Exception { expectAuth(ROLE, true); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); expect(cronJobManager.deleteJob(JOB_KEY)).andReturn(true); control.replay(); assertResponse(OK, thrift.descheduleCronJob(CRON_JOB.getKey(), null, SESSION)); @@ -1234,7 +1233,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { @Test public void testDescheduleCronJobFailsLockValidation() throws Exception { expectAuth(ROLE, true); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); expectLastCall().andThrow(new LockException("Failed lock")); control.replay(); assertResponse(LOCK_ERROR, thrift.descheduleCronJob(CRON_JOB.getKey(), null, SESSION)); @@ -1243,7 +1242,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { @Test public void testDescheduleNotACron() throws Exception { expectAuth(ROLE, true); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); expect(cronJobManager.deleteJob(JOB_KEY)).andReturn(false); control.replay(); @@ -1272,7 +1271,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { public void testRewriteNoCommands() throws Exception { control.replay(); - RewriteConfigsRequest request = new RewriteConfigsRequest(ImmutableList.<ConfigRewrite>of()); + RewriteConfigsRequest request = new RewriteConfigsRequest(ImmutableList.of()); assertResponse(INVALID_REQUEST, thrift.rewriteConfigs(request, SESSION)); } @@ -1415,7 +1414,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { JobConfiguration newJob = oldJob.deepCopy(); newJob.getTaskConfig().setExecutorConfig(new ExecutorConfig("aurora", "rewritten")); expect(storageUtil.jobStore.fetchJob(IJobKey.build(oldJob.getKey()))) - .andReturn(Optional.<IJobConfiguration>absent()); + .andReturn(Optional.absent()); control.replay(); @@ -1501,7 +1500,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { } private static Response okEmptyResponse() { - return response(OK, Optional.<Result>absent()); + return response(OK, Optional.absent()); } private static Response invalidResponse(String message) { @@ -1566,7 +1565,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { AddInstancesConfig config = createInstanceConfig(populatedTask.newBuilder()); expectAuth(ROLE, true); expectNoCronJob(); - lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.<ILock>empty()); + lockManager.validateIfLocked(LOCK_KEY, java.util.Optional.empty()); storageUtil.expectTaskFetch(Query.jobScoped(JOB_KEY).active()); expect(taskIdGenerator.generate(populatedTask, 1)) .andReturn(TASK_ID); @@ -2457,7 +2456,7 @@ public class SchedulerThriftInterfaceTest extends EasyMockTest { private IExpectationSetters<?> expectNoCronJob() { return expect(storageUtil.jobStore.fetchJob(JOB_KEY)) - .andReturn(Optional.<IJobConfiguration>absent()); + .andReturn(Optional.absent()); } private IExpectationSetters<?> expectInstanceQuotaCheck( http://git-wip-us.apache.org/repos/asf/aurora/blob/013ba6ff/src/test/java/org/apache/aurora/scheduler/thrift/aop/AopModuleTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/aurora/scheduler/thrift/aop/AopModuleTest.java b/src/test/java/org/apache/aurora/scheduler/thrift/aop/AopModuleTest.java index 5c85300..70469fb 100644 --- a/src/test/java/org/apache/aurora/scheduler/thrift/aop/AopModuleTest.java +++ b/src/test/java/org/apache/aurora/scheduler/thrift/aop/AopModuleTest.java @@ -75,7 +75,7 @@ public class AopModuleTest extends EasyMockTest { @Test public void testNoFlaggedMethods() throws Exception { - assertCreateAllowed(ImmutableMap.<String, Boolean>of()); + assertCreateAllowed(ImmutableMap.of()); } @Test @@ -115,7 +115,7 @@ public class AopModuleTest extends EasyMockTest { public void assertToStringNotIntercepted() { control.replay(); - Iface thrift = getIface(ImmutableMap.<String, Boolean>of()); + Iface thrift = getIface(ImmutableMap.of()); assertNotNull(thrift.toString()); } } http://git-wip-us.apache.org/repos/asf/aurora/blob/013ba6ff/src/test/java/org/apache/aurora/scheduler/thrift/aop/FeatureToggleInterceptorTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/aurora/scheduler/thrift/aop/FeatureToggleInterceptorTest.java b/src/test/java/org/apache/aurora/scheduler/thrift/aop/FeatureToggleInterceptorTest.java index 22a1546..cd6cdf7 100644 --- a/src/test/java/org/apache/aurora/scheduler/thrift/aop/FeatureToggleInterceptorTest.java +++ b/src/test/java/org/apache/aurora/scheduler/thrift/aop/FeatureToggleInterceptorTest.java @@ -64,7 +64,7 @@ public class FeatureToggleInterceptorTest extends EasyMockTest { Response response = new Response() .setResponseCode(ResponseCode.OK); - expect(predicate.apply(EasyMock.<Method>anyObject())).andReturn(true); + expect(predicate.apply(EasyMock.anyObject())).andReturn(true); expect(realThrift.getTasksStatus(query)).andReturn(response); control.replay(); @@ -75,7 +75,7 @@ public class FeatureToggleInterceptorTest extends EasyMockTest { @Test public void testPredicateDeny() throws Exception { TaskQuery query = new TaskQuery(); - expect(predicate.apply(EasyMock.<Method>anyObject())).andReturn(false); + expect(predicate.apply(EasyMock.anyObject())).andReturn(false); control.replay(); http://git-wip-us.apache.org/repos/asf/aurora/blob/013ba6ff/src/test/java/org/apache/aurora/scheduler/thrift/aop/ServerInfoInterceptorTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/aurora/scheduler/thrift/aop/ServerInfoInterceptorTest.java b/src/test/java/org/apache/aurora/scheduler/thrift/aop/ServerInfoInterceptorTest.java index 793684c..5355bea 100644 --- a/src/test/java/org/apache/aurora/scheduler/thrift/aop/ServerInfoInterceptorTest.java +++ b/src/test/java/org/apache/aurora/scheduler/thrift/aop/ServerInfoInterceptorTest.java @@ -21,7 +21,6 @@ import com.google.inject.matcher.Matchers; import com.twitter.common.testing.easymock.EasyMockTest; import org.apache.aurora.gen.GetJobsResult; -import org.apache.aurora.gen.JobConfiguration; import org.apache.aurora.gen.Response; import org.apache.aurora.gen.Result; import org.apache.aurora.gen.ServerInfo; @@ -73,8 +72,7 @@ public class ServerInfoInterceptorTest extends EasyMockTest { new ServerInfo().setClusterName("FAKECLUSTER").setThriftAPIVersion(100000); Response response = okResponse( - Result.getJobsResult( - new GetJobsResult().setConfigs(ImmutableSet.<JobConfiguration>of()))) + Result.getJobsResult(new GetJobsResult().setConfigs(ImmutableSet.of()))) .setServerInfo(previousServerInfo); expect(realThrift.getJobs(ROLE)).andReturn(response); http://git-wip-us.apache.org/repos/asf/aurora/blob/013ba6ff/src/test/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptorTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptorTest.java b/src/test/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptorTest.java index dac9af2..998c9cd 100644 --- a/src/test/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptorTest.java +++ b/src/test/java/org/apache/aurora/scheduler/thrift/aop/ThriftStatsExporterInterceptorTest.java @@ -22,7 +22,6 @@ import com.twitter.common.stats.Stats; import com.twitter.common.testing.easymock.EasyMockTest; import org.apache.aurora.gen.GetJobsResult; -import org.apache.aurora.gen.JobConfiguration; import org.apache.aurora.gen.Response; import org.apache.aurora.gen.Result; import org.apache.aurora.scheduler.thrift.auth.DecoratedThrift; @@ -63,7 +62,7 @@ public class ThriftStatsExporterInterceptorTest extends EasyMockTest { public void testIncrementStat() throws Exception { Response response = new Response().setResponseCode(OK) .setResult(Result.getJobsResult(new GetJobsResult() - .setConfigs(ImmutableSet.<JobConfiguration>of()))); + .setConfigs(ImmutableSet.of()))); expect(realThrift.getJobs(ROLE)).andReturn(response); control.replay(); http://git-wip-us.apache.org/repos/asf/aurora/blob/013ba6ff/src/test/java/org/apache/aurora/scheduler/updater/InstanceUpdaterTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/aurora/scheduler/updater/InstanceUpdaterTest.java b/src/test/java/org/apache/aurora/scheduler/updater/InstanceUpdaterTest.java index 1128303..c191c85 100644 --- a/src/test/java/org/apache/aurora/scheduler/updater/InstanceUpdaterTest.java +++ b/src/test/java/org/apache/aurora/scheduler/updater/InstanceUpdaterTest.java @@ -234,7 +234,7 @@ public class InstanceUpdaterTest { public void testInvalidInput() { TestFixture f = new TestFixture(NEW, 1); ScheduledTask noEvents = new TaskUtil(new FakeClock()) - .makeTask(OLD, RUNNING).newBuilder().setTaskEvents(ImmutableList.<TaskEvent>of()); + .makeTask(OLD, RUNNING).newBuilder().setTaskEvents(ImmutableList.of()); f.updater.evaluate(Optional.of(IScheduledTask.build(noEvents))); } http://git-wip-us.apache.org/repos/asf/aurora/blob/013ba6ff/src/test/java/org/apache/aurora/scheduler/updater/JobDiffTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/aurora/scheduler/updater/JobDiffTest.java b/src/test/java/org/apache/aurora/scheduler/updater/JobDiffTest.java index ddec9e6..d0deada 100644 --- a/src/test/java/org/apache/aurora/scheduler/updater/JobDiffTest.java +++ b/src/test/java/org/apache/aurora/scheduler/updater/JobDiffTest.java @@ -45,7 +45,7 @@ public class JobDiffTest extends EasyMockTest { private static final IJobKey JOB = JobKeys.from("role", "env", "job"); private static final JobDiff NO_DIFF = - new JobDiff(ImmutableMap.<Integer, ITaskConfig>of(), ImmutableSet.<Integer>of()); + new JobDiff(ImmutableMap.of(), ImmutableSet.of()); private static final Set<IRange> NO_SCOPE = ImmutableSet.of(); private static final Set<IRange> CANARY_SCOPE = ImmutableSet.of(IRange.build(new Range(0, 0))); @@ -77,7 +77,7 @@ public class JobDiffTest extends EasyMockTest { control.replay(); assertEquals( - new JobDiff(ImmutableMap.<Integer, ITaskConfig>of(), ImmutableSet.of(2, 3, 4)), + new JobDiff(ImmutableMap.of(), ImmutableSet.of(2, 3, 4)), JobDiff.compute(store, JOB, JobDiff.asMap(task, 5), NO_SCOPE)); assertEquals( NO_DIFF, @@ -93,7 +93,7 @@ public class JobDiffTest extends EasyMockTest { control.replay(); assertEquals( - new JobDiff(ImmutableMap.of(1, task, 2, task), ImmutableSet.<Integer>of()), + new JobDiff(ImmutableMap.of(1, task, 2, task), ImmutableSet.of()), JobDiff.compute(store, JOB, JobDiff.asMap(task, 1), NO_SCOPE)); assertEquals( NO_DIFF, http://git-wip-us.apache.org/repos/asf/aurora/blob/013ba6ff/src/test/java/org/apache/aurora/scheduler/updater/JobUpdaterIT.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/aurora/scheduler/updater/JobUpdaterIT.java b/src/test/java/org/apache/aurora/scheduler/updater/JobUpdaterIT.java index 33dd9f1..8b99e0f 100644 --- a/src/test/java/org/apache/aurora/scheduler/updater/JobUpdaterIT.java +++ b/src/test/java/org/apache/aurora/scheduler/updater/JobUpdaterIT.java @@ -208,7 +208,7 @@ public class JobUpdaterIT extends EasyMockTest { @After public void validateExitState() { clock.assertEmpty(); - assertEquals(ImmutableList.<ILock>of(), ImmutableList.copyOf(lockManager.getLocks())); + assertEquals(ImmutableList.of(), ImmutableList.copyOf(lockManager.getLocks())); } @Test(expected = UpdateStateException.class) @@ -245,9 +245,9 @@ public class JobUpdaterIT extends EasyMockTest { assertEquals(StateChangeResult.SUCCESS, stateManager.changeState( storeProvider, getTaskId(job, instanceId), - Optional.<ScheduleStatus>absent(), + Optional.absent(), s, - Optional.<String>absent())); + Optional.absent())); } }); } @@ -298,7 +298,7 @@ public class JobUpdaterIT extends EasyMockTest { } private IExpectationSetters<String> expectTaskKilled() { - driver.killTask(EasyMock.<String>anyObject()); + driver.killTask(EasyMock.anyObject()); return expectLastCall(); } @@ -1158,7 +1158,7 @@ public class JobUpdaterIT extends EasyMockTest { }); subscriber.startAsync().awaitRunning(); - assertState(ERROR, ImmutableMultimap.<Integer, JobUpdateAction>of()); + assertState(ERROR, ImmutableMultimap.of()); } @Test @@ -1375,7 +1375,7 @@ public class JobUpdaterIT extends EasyMockTest { .setRollbackOnFailure(true) .setMaxWaitToInstanceRunningMs(RUNNING_TIMEOUT.as(Time.MILLISECONDS).intValue()) .setMinWaitInInstanceRunningMs(WATCH_TIMEOUT.as(Time.MILLISECONDS).intValue()) - .setUpdateOnlyTheseInstances(ImmutableSet.<Range>of()))); + .setUpdateOnlyTheseInstances(ImmutableSet.of()))); for (IInstanceTaskConfig config : configs) { builder.getInstructions().addToInitialState(config.newBuilder()); http://git-wip-us.apache.org/repos/asf/aurora/blob/013ba6ff/src/test/java/org/apache/aurora/scheduler/updater/OneWayJobUpdaterTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/aurora/scheduler/updater/OneWayJobUpdaterTest.java b/src/test/java/org/apache/aurora/scheduler/updater/OneWayJobUpdaterTest.java index d32b40a..7f5256d 100644 --- a/src/test/java/org/apache/aurora/scheduler/updater/OneWayJobUpdaterTest.java +++ b/src/test/java/org/apache/aurora/scheduler/updater/OneWayJobUpdaterTest.java @@ -21,7 +21,6 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.twitter.common.testing.easymock.EasyMockTest; -import org.apache.aurora.scheduler.updater.StateEvaluator.Failure; import org.apache.aurora.scheduler.updater.strategy.UpdateStrategy; import org.junit.Before; import org.junit.Test; @@ -76,7 +75,7 @@ public class OneWayJobUpdaterTest extends EasyMockTest { private void evaluate(OneWayStatus expectedStatus, Map<Integer, SideEffect> expectedSideEffects) { assertEquals( new EvaluationResult<>(expectedStatus, expectedSideEffects), - jobUpdater.evaluate(ImmutableMap.<Integer, String>of(), stateProvider)); + jobUpdater.evaluate(ImmutableMap.of(), stateProvider)); } private void evaluate( @@ -112,14 +111,14 @@ public class OneWayJobUpdaterTest extends EasyMockTest { return new SideEffect( Optional.of(action), ImmutableSet.<InstanceUpdateStatus>builder().add(statuses).build(), - Optional.<Failure>absent()); + Optional.absent()); } private static SideEffect sideEffect(InstanceUpdateStatus... statuses) { return new SideEffect( - Optional.<InstanceAction>absent(), + Optional.absent(), ImmutableSet.<InstanceUpdateStatus>builder().add(statuses).build(), - Optional.<Failure>absent()); + Optional.absent()); } @Test @@ -215,7 +214,7 @@ public class OneWayJobUpdaterTest extends EasyMockTest { // The updater should now reject further attempts to evaluate. try { - jobUpdater.evaluate(ImmutableMap.<Integer, String>of(), stateProvider); + jobUpdater.evaluate(ImmutableMap.of(), stateProvider); fail(); } catch (IllegalStateException e) { // Expected. @@ -229,7 +228,7 @@ public class OneWayJobUpdaterTest extends EasyMockTest { expect(strategy.getNextGroup(ImmutableSet.of(1, 2, 3), EMPTY)) .andReturn(ImmutableSet.of(1)); expect(strategy.getNextGroup(ImmutableSet.of(2, 3), ImmutableSet.of(1))) - .andReturn(ImmutableSet.<Integer>of()); + .andReturn(ImmutableSet.of()); String s0 = "0"; String s1 = "1"; expectFetchAndEvaluate( @@ -259,7 +258,7 @@ public class OneWayJobUpdaterTest extends EasyMockTest { 0, s0, OneWayStatus.WORKING, - ImmutableMap.<Integer, SideEffect>of()); + ImmutableMap.of()); } @Test http://git-wip-us.apache.org/repos/asf/aurora/blob/013ba6ff/src/test/java/org/apache/aurora/scheduler/updater/UpdateFactoryImplTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/aurora/scheduler/updater/UpdateFactoryImplTest.java b/src/test/java/org/apache/aurora/scheduler/updater/UpdateFactoryImplTest.java index d6e855b..998045e 100644 --- a/src/test/java/org/apache/aurora/scheduler/updater/UpdateFactoryImplTest.java +++ b/src/test/java/org/apache/aurora/scheduler/updater/UpdateFactoryImplTest.java @@ -48,7 +48,7 @@ public class UpdateFactoryImplTest { .setMaxWaitToInstanceRunningMs(100) .setMinWaitInInstanceRunningMs(100) .setUpdateGroupSize(2) - .setUpdateOnlyTheseInstances(ImmutableSet.<Range>of()))); + .setUpdateOnlyTheseInstances(ImmutableSet.of()))); private UpdateFactory factory;
