HADOOP-9773. TestLightWeightCache should not set size limit to zero when testing it.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1507165 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8fa3ebd134
commit
42e8cbf92c
|
@ -644,6 +644,9 @@ Release 2.1.0-beta - 2013-07-02
|
|||
HADOOP-9759. Add support for NativeCodeLoader#getLibraryName on Windows.
|
||||
(Chuan Liu via cnauroth)
|
||||
|
||||
HADOOP-9773. TestLightWeightCache should not set size limit to zero when
|
||||
testing it. (szetszwo)
|
||||
|
||||
BREAKDOWN OF HADOOP-8562 SUBTASKS AND RELATED JIRAS
|
||||
|
||||
HADOOP-8924. Hadoop Common creating package-info.java must not depend on
|
||||
|
|
|
@ -27,9 +27,10 @@ import org.junit.Test;
|
|||
/** Testing {@link LightWeightCache} */
|
||||
public class TestLightWeightCache {
|
||||
private static final long starttime = Time.now();
|
||||
private static final Random ran = new Random(starttime);
|
||||
private static final long seed = starttime;
|
||||
private static final Random ran = new Random(seed);
|
||||
static {
|
||||
println("Start time = " + new Date(starttime) + ", seed=" + starttime);
|
||||
println("Start time = " + new Date(starttime) + ", seed=" + seed);
|
||||
}
|
||||
|
||||
private static void print(Object s) {
|
||||
|
@ -65,7 +66,7 @@ public class TestLightWeightCache {
|
|||
final int dataSize = 1 << 16;
|
||||
for(int i = 0; i < 10; i++) {
|
||||
final int modulus = ran.nextInt(1024) + 1;
|
||||
final int sizeLimit = ran.nextInt(modulus);
|
||||
final int sizeLimit = ran.nextInt(modulus) + 1;
|
||||
checkSizeLimit(sizeLimit, dataSize, modulus);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue