YARN-1136. Replace junit.framework.Assert with org.junit.Assert (Chen He via jeagles)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1578546 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonathan Turner Eagles 2014-03-17 20:20:22 +00:00
parent 453c36b191
commit 8e38068076
110 changed files with 131 additions and 128 deletions

View File

@ -29,6 +29,9 @@ Release 2.5.0 - UNRELEASED
YARN-1845. Elapsed time for failed tasks that never started is wrong
(Rushabh S Shah via jeagles)
YARN-1136. Replace junit.framework.Assert with org.junit.Assert (Chen He
via jeagles)
OPTIMIZATIONS
BUG FIXES

View File

@ -31,7 +31,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -28,7 +28,7 @@ import java.io.IOException;
import java.io.OutputStream;
import java.net.URL;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -35,7 +35,7 @@ import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -36,7 +36,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicIntegerArray;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.service.ServiceOperations;

View File

@ -27,7 +27,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.api.ApplicationHistoryProtocol;

View File

@ -36,7 +36,7 @@ import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.security.UserGroupInformation;

View File

@ -27,7 +27,7 @@ import static org.mockito.Mockito.when;
import java.net.ConnectException;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.yarn.api.records.timeline.TimelineEntities;
import org.apache.hadoop.yarn.api.records.timeline.TimelineEntity;

View File

@ -33,7 +33,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.io.IOUtils;
import org.apache.hadoop.conf.Configuration;

View File

@ -29,7 +29,7 @@ import java.io.IOException;
import java.io.PrintStream;
import java.io.PrintWriter;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;

View File

@ -39,7 +39,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.lang.time.DateFormatUtils;
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;

View File

@ -24,7 +24,7 @@ import java.net.SocketTimeoutException;
import java.util.ArrayList;
import java.util.List;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -23,7 +23,7 @@ import java.net.InetSocketAddress;
import java.util.ArrayList;
import java.util.List;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.Text;

View File

@ -21,7 +21,7 @@ package org.apache.hadoop.yarn;
import java.io.IOException;
import java.net.InetSocketAddress;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.ipc.Server;

View File

@ -18,7 +18,7 @@
package org.apache.hadoop.yarn;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.yarn.exceptions.YarnRuntimeException;
import org.apache.hadoop.yarn.factories.RecordFactory;

View File

@ -18,7 +18,7 @@
package org.apache.hadoop.yarn;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.conf.YarnConfiguration;

View File

@ -21,7 +21,7 @@ package org.apache.hadoop.yarn.api;
import java.util.ArrayList;
import java.util.List;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest;
import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.AllocateRequestPBImpl;

View File

@ -21,7 +21,7 @@ package org.apache.hadoop.yarn.api;
import java.util.ArrayList;
import java.util.List;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse;
import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.AllocateResponsePBImpl;

View File

@ -19,7 +19,7 @@
package org.apache.hadoop.yarn.api;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
import org.apache.hadoop.yarn.api.records.ApplicationId;
@ -66,4 +66,4 @@ public class TestApplicationAttemptId {
TestApplicationAttemptId t = new TestApplicationAttemptId();
t.testApplicationAttemptId();
}
}
}

View File

@ -18,7 +18,7 @@
package org.apache.hadoop.yarn.api;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.yarn.api.records.ApplicationId;
import org.junit.Test;
@ -50,4 +50,4 @@ public class TestApplicationId {
Assert.assertEquals("application_" + ts + "_45436343", a5.toString());
}
}
}

View File

@ -19,7 +19,7 @@
package org.apache.hadoop.yarn.api;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
import org.apache.hadoop.yarn.api.records.ApplicationId;

View File

@ -18,7 +18,7 @@
package org.apache.hadoop.yarn.api;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
import org.apache.hadoop.yarn.api.records.ApplicationId;

View File

@ -20,7 +20,7 @@ package org.apache.hadoop.yarn.api;
import java.util.Arrays;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
import org.apache.hadoop.yarn.api.records.ApplicationId;

View File

@ -18,7 +18,7 @@
package org.apache.hadoop.yarn.api;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
import org.apache.hadoop.yarn.api.records.ApplicationId;

View File

@ -18,7 +18,7 @@
package org.apache.hadoop.yarn.api;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.yarn.api.records.NodeId;
import org.junit.Test;

View File

@ -21,7 +21,7 @@ package org.apache.hadoop.yarn.api.records.timeline;
import java.util.ArrayList;
import java.util.List;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -18,7 +18,7 @@
package org.apache.hadoop.yarn.conf;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.yarn.webapp.util.WebAppUtils;
import org.junit.Test;

View File

@ -21,7 +21,7 @@ package org.apache.hadoop.yarn.ipc;
import java.io.FileNotFoundException;
import java.io.IOException;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.ipc.RemoteException;
import org.apache.hadoop.yarn.exceptions.YarnException;

View File

@ -35,7 +35,7 @@ import java.io.Writer;
import java.util.Arrays;
import java.util.Collections;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -18,11 +18,11 @@
package org.apache.hadoop.yarn.util;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNull;
import static junit.framework.Assert.assertTrue;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.apache.hadoop.yarn.util.ApplicationClassLoader.constructUrlsFromClasspath;
import static org.apache.hadoop.yarn.util.ApplicationClassLoader.isSystemClass;

View File

@ -51,7 +51,7 @@ import java.util.zip.GZIPOutputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
@ -669,4 +669,4 @@ public class TestFSDownload {
// destination directory (passed as an argument) + file name.
Assert.assertEquals(destPath, rPath.get().getParent());
}
}
}

View File

@ -21,7 +21,7 @@ package org.apache.hadoop.yarn.server.applicationhistoryservice;
import java.io.IOException;
import java.util.List;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationAttemptReportRequest;

View File

@ -21,7 +21,7 @@ package org.apache.hadoop.yarn.server.applicationhistoryservice;
import java.io.IOException;
import java.net.URI;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;

View File

@ -20,7 +20,7 @@ package org.apache.hadoop.yarn.server.applicationhistoryservice;
import java.io.IOException;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
import org.apache.hadoop.yarn.api.records.ApplicationId;

View File

@ -20,7 +20,7 @@ package org.apache.hadoop.yarn.server.applicationhistoryservice.webapp;
import static org.apache.hadoop.yarn.webapp.Params.TITLE;
import static org.mockito.Mockito.mock;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;

View File

@ -23,7 +23,7 @@ import static org.junit.Assert.fail;
import javax.ws.rs.core.MediaType;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
import org.apache.hadoop.yarn.api.records.ApplicationId;

View File

@ -22,7 +22,7 @@ import static org.junit.Assert.assertEquals;
import javax.ws.rs.core.MediaType;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.yarn.api.records.timeline.TimelineEntities;
import org.apache.hadoop.yarn.api.records.timeline.TimelineEntity;

View File

@ -21,7 +21,7 @@ package org.apache.hadoop.yarn;
import java.io.IOException;
import java.net.InetSocketAddress;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.ipc.Server;

View File

@ -18,7 +18,7 @@
package org.apache.hadoop.yarn;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.yarn.exceptions.YarnRuntimeException;
import org.apache.hadoop.yarn.factories.RecordFactory;

View File

@ -26,7 +26,7 @@ import java.io.OutputStream;
import java.net.InetSocketAddress;
import java.net.Socket;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.yarn.lib.ZKClient;
import org.apache.zookeeper.server.NIOServerCnxnFactory;

View File

@ -27,7 +27,7 @@ import java.util.EnumSet;
import java.util.List;
import java.util.Random;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.AbstractFileSystem;

View File

@ -18,7 +18,7 @@
package org.apache.hadoop.yarn.server.nodemanager;
import static junit.framework.Assert.assertEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
@ -31,7 +31,7 @@ import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;

View File

@ -18,7 +18,7 @@
package org.apache.hadoop.yarn.server.nodemanager;
import static junit.framework.Assert.assertEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assume.assumeTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@ -34,7 +34,7 @@ import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -17,7 +17,7 @@
*/
package org.apache.hadoop.yarn.server.nodemanager;
import static junit.framework.Assert.assertEquals;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

View File

@ -27,7 +27,7 @@ import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.atomic.AtomicBoolean;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.fs.FileContext;
import org.apache.hadoop.fs.Path;

View File

@ -32,7 +32,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileContext;

View File

@ -22,7 +22,7 @@ import java.net.InetSocketAddress;
import org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.LocalizerHeartbeatResponse;
import org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.LocalizerStatus;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.ipc.Server;

View File

@ -24,7 +24,7 @@ import org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.LocalizerHe
import org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.impl.pb.LocalizerHeartbeatResponsePBImpl;
import org.junit.Test;
import junit.framework.Assert;
import org.junit.Assert;
public class TestRecordFactory {

View File

@ -25,7 +25,7 @@ import java.io.IOException;
import java.net.URISyntaxException;
import java.util.ArrayList;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;

View File

@ -26,7 +26,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -31,7 +31,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -31,7 +31,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.fs.FileContext;

View File

@ -32,7 +32,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.api.records.ApplicationAccessType;

View File

@ -48,7 +48,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;

View File

@ -36,7 +36,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.codec.binary.Base64;
import org.apache.hadoop.conf.Configuration;

View File

@ -18,7 +18,7 @@
package org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.yarn.conf.YarnConfiguration;
@ -109,4 +109,4 @@ public class TestLocalCacheDirectoryManager {
// first sub directory
Assert.assertEquals(firstSubDir, dir.getRelativePathForLocalization());
}
}
}

View File

@ -30,7 +30,7 @@ import java.util.Iterator;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;

View File

@ -56,7 +56,7 @@ import java.util.concurrent.BrokenBarrierException;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.Future;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.AbstractFileSystem;

View File

@ -18,8 +18,8 @@
package org.apache.hadoop.yarn.server.nodemanager.containermanager.logaggregation;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertTrue;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyMap;
import static org.mockito.Matchers.eq;
@ -51,7 +51,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.LogFactory;

View File

@ -34,7 +34,7 @@ import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.fs.FileUtil;

View File

@ -17,7 +17,7 @@
*/
package org.apache.hadoop.yarn.server.nodemanager.util;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.yarn.conf.YarnConfiguration;
import org.apache.hadoop.yarn.util.Clock;
import org.junit.Test;

View File

@ -23,7 +23,7 @@ import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.util.Shell;

View File

@ -31,7 +31,7 @@ import javax.ws.rs.core.MediaType;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileUtil;

View File

@ -23,7 +23,7 @@ import java.security.PrivilegedExceptionAction;
import java.util.ArrayList;
import java.util.List;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.security.UserGroupInformation;
import org.apache.hadoop.security.token.Token;

View File

@ -23,7 +23,7 @@ import java.nio.ByteBuffer;
import java.security.PrivilegedAction;
import java.util.Map;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.DataOutputBuffer;

View File

@ -25,7 +25,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -24,7 +24,7 @@ import java.security.PrivilegedExceptionAction;
import java.util.HashMap;
import java.util.Map;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -33,7 +33,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.concurrent.ConcurrentMap;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.service.Service;

View File

@ -29,7 +29,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -23,7 +23,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@ -257,4 +257,4 @@ public class TestApplicationCleanup {
TestApplicationCleanup t = new TestApplicationCleanup();
t.testAppCleanup();
}
}
}

View File

@ -19,7 +19,7 @@
package org.apache.hadoop.yarn.server.resourcemanager;
import com.google.common.collect.Maps;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -43,7 +43,7 @@ import java.util.concurrent.BrokenBarrierException;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CyclicBarrier;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -36,7 +36,7 @@ import java.net.InetSocketAddress;
import java.security.PrivilegedAction;
import java.security.PrivilegedExceptionAction;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -22,7 +22,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -28,7 +28,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -17,7 +17,7 @@
*/
package org.apache.hadoop.yarn.server.resourcemanager;
import static junit.framework.Assert.assertEquals;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

View File

@ -37,7 +37,7 @@ import org.junit.Test;
import java.io.IOException;
import junit.framework.Assert;
import org.junit.Assert;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;

View File

@ -28,7 +28,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.util.HostsFileReader;
import org.apache.hadoop.yarn.api.records.ApplicationId;

View File

@ -26,7 +26,7 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.IOUtils;

View File

@ -18,7 +18,7 @@
package org.apache.hadoop.yarn.server.resourcemanager;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -27,7 +27,7 @@ import java.util.List;
import java.util.Map;
import java.util.Random;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;

View File

@ -23,7 +23,7 @@ import java.util.Arrays;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -21,7 +21,7 @@ package org.apache.hadoop.yarn.server.resourcemanager.applicationsmanager;
import java.security.PrivilegedExceptionAction;
import java.util.List;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.security.UserGroupInformation;
import org.apache.hadoop.security.token.Token;

View File

@ -20,7 +20,7 @@ package org.apache.hadoop.yarn.server.resourcemanager.applicationsmanager;
import java.security.PrivilegedExceptionAction;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.security.UserGroupInformation;
import org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest;

View File

@ -22,7 +22,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse;
import org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse;

View File

@ -20,7 +20,7 @@ package org.apache.hadoop.yarn.server.resourcemanager.applicationsmanager;
import java.util.concurrent.atomic.AtomicInteger;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -20,7 +20,7 @@ package org.apache.hadoop.yarn.server.resourcemanager.applicationsmanager;
import java.util.concurrent.atomic.AtomicInteger;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -33,7 +33,7 @@ import java.util.Map;
import javax.crypto.SecretKey;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -23,7 +23,7 @@ import static org.junit.Assert.assertTrue;
import java.io.IOException;
import java.util.concurrent.atomic.AtomicBoolean;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -17,7 +17,7 @@
*/
package org.apache.hadoop.yarn.server.resourcemanager.resource;
import junit.framework.Assert;
import org.junit.Assert;
import org.junit.Test;
@ -52,4 +52,4 @@ public class TestResourceWeights {
Assert.assertEquals("The memory weight should be set to 4.0f.", 4.0f,
rw3.getWeight(ResourceType.MEMORY), 0.00001f);
}
}
}

View File

@ -18,7 +18,7 @@
package org.apache.hadoop.yarn.server.resourcemanager.resourcetracker;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -18,7 +18,7 @@
package org.apache.hadoop.yarn.server.resourcemanager.resourcetracker;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.yarn.api.records.NodeId;
import org.apache.hadoop.yarn.api.records.Resource;

View File

@ -28,7 +28,7 @@ import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@ -256,7 +256,7 @@ public class TestRMAppTransitions {
Assert.assertEquals("application id is not correct",
applicationId, application.getApplicationId());
Assert.assertEquals("application progress is not correct",
(float)0.0, application.getProgress());
(float)0.0, application.getProgress(), (float)0.0);
Assert.assertEquals("application queue is not correct",
queue, application.getQueue());
Assert.assertEquals("application name is not correct",

View File

@ -34,7 +34,7 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -21,7 +21,7 @@ package org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity;
import java.util.ArrayList;
import java.util.List;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@ -246,4 +246,4 @@ public class TestContainerAllocation {
rm1.waitForState(attempt.getAppAttemptId(), RMAppAttemptState.ALLOCATED);
MockRM.launchAndRegisterAM(app1, rm1, nm1);
}
}
}

View File

@ -40,7 +40,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -35,7 +35,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -18,7 +18,7 @@
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@ -17,7 +17,7 @@
*/
package org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair;
import static junit.framework.Assert.*;
import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import java.io.File;

View File

@ -21,7 +21,7 @@ package org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair;
import java.util.ArrayList;
import java.util.List;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.yarn.util.resource.Resources;
import org.apache.hadoop.yarn.server.resourcemanager.resource.ResourceType;

Some files were not shown because too many files have changed in this diff Show More