public Properties getProperties() { Properties properties = new Properties(super.getProperties()); if (log.isInfoEnabled()) log.info("Setting " + Options.DATA_DIR + "=" + dataDir); properties.setProperty( com.bigdata.resources.ResourceManager.Options.DATA_DIR, dataDir .toString()); // // disable the write cache to avoid memory leak in the test suite. // properties.setProperty(Options.WRITE_CACHE_ENABLED, "false"); return properties; }
@Override protected void setUp() throws Exception { super.setUp(); r = new Random(); }
protected void tearDown() throws Exception { super.tearDown(); factory = null; r = null; }
fail( msg+"Expected a null array." ); fail( msg+"Not expecting a null array." ); assertEquals(msg + "length differs.", expected.length, actual.length); assertEquals(msg + "values differ: index=" + i, expected[i], actual[i]);
fail(message + " : expecting actual to be non-null."); fail(message + " : expecting actual to be null."); assertEquals(message + " : length is wrong.", expected.length, actual.length); fail(message + " : expecting actual[" + i + "] to be non-null"); fail(message + " : expecting actual[" + i + "] to be null."); assertTrue(message + " : expected[" + i + "]=" + expected[i] + ", but actual[" + i + "]=" + actual[i], expected[i] .equals(actual[i]));
/** * Provides a proper basis for comparing floating point numbers (the values * must be within 10 ulps of one another). * * @param expected * @param actual * * @see #getUlps(double, double) */ public static void assertEquals(double expected, double actual) { assertEquals("", expected, actual); }
/** * Helper method verifies that the arrays are consistent in length * and that their elements are consistent under {@link * Object#equals( Object other )}. */ public static void assertSameArray(Object[] expected, Object[] actual) { assertSameArray("", expected, actual); }
int[] order = getRandomOrder(data.length()); int n = getNormalInt(len);
/** * Randomize the conditions. * * @param conditions * @return */ static public Collection<Condition> randomize(Collection<Condition> conditions) { Condition[] a = conditions.toArray(new Condition[conditions.size()]); int[] order = TestCase2.getRandomOrder(a.length); List<Condition> ret = new ArrayList<Condition>(a.length); // add to result in permutated order. for( int i : order ) { ret.add(a[i]); } return ret; }
/** * Provides a proper basis for comparing floating point numbers (the values * must be within 10 ulps of one another). * * @see #getUlps(float, float) */ public static void assertEquals(float expected, float actual) { assertEquals("", expected, actual); }
fail( msg+"Expected a null array." ); fail( msg+"Not expecting a null array." ); assertEquals(msg + "length differs.", expected.length, actual.length); assertEquals(msg + "values differ: index=" + i, expected[i], actual[i]);
fail(message + " : expecting actual to be non-null."); fail(message + " : expecting actual to be null."); assertEquals(message + " : length is wrong.", expected.length, actual.length); fail(message + " : expecting actual[" + i + "] to be non-null"); fail(message + " : expecting actual[" + i + "] to be null."); assertTrue(message + " : expected[" + i + "]=" + expected[i] + ", but actual[" + i + "]=" + actual[i], expected[i] .equals(actual[i]));
/** * Helper method verifies that the arrays are consistent in length * and that their elements are consistent under {@link * Object#equals( Object other )}. */ public static void assertSameArray(Object[] expected, Object[] actual) { assertSameArray("", expected, actual); }
int[] order = getRandomOrder(data.length()); int n = getNormalInt(len);
public Properties getProperties() { Properties properties = new Properties(super.getProperties()); if (log.isInfoEnabled()) log.info("Setting " + Options.DATA_DIR + "=" + dataDir); properties.setProperty( com.bigdata.resources.ResourceManager.Options.DATA_DIR, dataDir .toString()); // // disable the write cache to avoid memory leak in the test suite. // properties.setProperty(Options.WRITE_CACHE_ENABLED, "false"); return properties; }
@Override protected void setUp() throws Exception { super.setUp(); serviceId1 = UUID.randomUUID(); serviceId2 = UUID.randomUUID(); }