HADOOP-13289. Remove unused variables in TestFairCallQueue. Contributed by Ye Zhou.
(cherry picked from commit 13814832331ad691b898cd9f602b0a0a771d7928) (cherry picked from commit 2231ef22f576d9a7d65276cf90efd0f45cb362f5)
This commit is contained in:
parent
6a04d9ab63
commit
bc21763da4
@ -32,7 +32,6 @@
|
|||||||
|
|
||||||
import org.apache.hadoop.security.UserGroupInformation;
|
import org.apache.hadoop.security.UserGroupInformation;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.mockito.Matchers;
|
|
||||||
|
|
||||||
public class TestFairCallQueue extends TestCase {
|
public class TestFairCallQueue extends TestCase {
|
||||||
private FairCallQueue<Schedulable> fcq;
|
private FairCallQueue<Schedulable> fcq;
|
||||||
@ -52,14 +51,6 @@ private Schedulable mockCall(String id) {
|
|||||||
return mockCall(id, 0);
|
return mockCall(id, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// A scheduler which always schedules into priority zero
|
|
||||||
private RpcScheduler alwaysZeroScheduler;
|
|
||||||
{
|
|
||||||
RpcScheduler sched = mock(RpcScheduler.class);
|
|
||||||
when(sched.getPriorityLevel(Matchers.<Schedulable>any())).thenReturn(0); // always queue 0
|
|
||||||
alwaysZeroScheduler = sched;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
Configuration conf = new Configuration();
|
Configuration conf = new Configuration();
|
||||||
@ -124,7 +115,6 @@ public void testOfferFailsWhenFull() {
|
|||||||
|
|
||||||
public void testOfferSucceedsWhenScheduledLowPriority() {
|
public void testOfferSucceedsWhenScheduledLowPriority() {
|
||||||
// Scheduler will schedule into queue 0 x 5, then queue 1
|
// Scheduler will schedule into queue 0 x 5, then queue 1
|
||||||
RpcScheduler sched = mock(RpcScheduler.class);
|
|
||||||
int mockedPriorities[] = {0, 0, 0, 0, 0, 1, 0};
|
int mockedPriorities[] = {0, 0, 0, 0, 0, 1, 0};
|
||||||
for (int i = 0; i < 5; i++) { assertTrue(fcq.offer(mockCall("c", mockedPriorities[i]))); }
|
for (int i = 0; i < 5; i++) { assertTrue(fcq.offer(mockCall("c", mockedPriorities[i]))); }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user