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