Fix limits on flaky test to avoid spurious failure (#344)
Signed-off-by: Alex Black <blacka101@gmail.com>master
parent
4e8f3a025f
commit
ec6abacdb8
|
@ -76,7 +76,7 @@ public class RandomOpValidation extends BaseOpValidation {
|
||||||
double min = in.minNumber().doubleValue();
|
double min = in.minNumber().doubleValue();
|
||||||
double max = in.maxNumber().doubleValue();
|
double max = in.maxNumber().doubleValue();
|
||||||
double mean = in.meanNumber().doubleValue();
|
double mean = in.meanNumber().doubleValue();
|
||||||
if (min >= 1 && max <= 2 && (in.length() == 1 || Math.abs(mean - 1.5) < 0.1))
|
if (min >= 1 && max <= 2 && (in.length() == 1 || Math.abs(mean - 1.5) < 0.2))
|
||||||
return null;
|
return null;
|
||||||
return "Failed: min = " + min + ", max = " + max + ", mean = " + mean;
|
return "Failed: min = " + min + ", max = " + max + ", mean = " + mean;
|
||||||
};
|
};
|
||||||
|
@ -87,7 +87,7 @@ public class RandomOpValidation extends BaseOpValidation {
|
||||||
checkFn = in -> {
|
checkFn = in -> {
|
||||||
double mean = in.meanNumber().doubleValue();
|
double mean = in.meanNumber().doubleValue();
|
||||||
double stdev = in.std(true).getDouble(0);
|
double stdev = in.std(true).getDouble(0);
|
||||||
if (in.length() == 1 || (Math.abs(mean - 1) < 0.1 && Math.abs(stdev - 1) < 0.1))
|
if (in.length() == 1 || (Math.abs(mean - 1) < 0.2 && Math.abs(stdev - 1) < 0.2))
|
||||||
return null;
|
return null;
|
||||||
return "Failed: mean = " + mean + ", stdev = " + stdev;
|
return "Failed: mean = " + mean + ", stdev = " + stdev;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue