Skip to content

Commit

Permalink
Don't test for exact outputs from random sample.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdice committed Mar 31, 2022
1 parent 9d26372 commit 1e20830
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions java/src/test/java/ai/rapids/cudf/TableTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8557,20 +8557,16 @@ void testExplodeOuterPosition() {
@Test
void testSample() {
try (Table t = new Table.TestBuilder().column("s1", "s2", "s3", "s4", "s5").build()) {
try (Table ret = t.sample(3, false, 0);
Table expected = new Table.TestBuilder().column("s3", "s4", "s5").build()) {
assertTablesAreEqual(expected, ret);
try (Table ret = t.sample(3, false, 0)) {
assertEquals(ret.getRowCount(), 3);
}

try (Table ret = t.sample(5, false, 0);
Table expected = new Table.TestBuilder().column("s3", "s4", "s5", "s2", "s1").build()) {
assertTablesAreEqual(expected, ret);
try (Table ret = t.sample(5, false, 0)) {
assertEquals(ret.getRowCount(), 5);
}

try (Table ret = t.sample(8, true, 0);
Table expected = new Table.TestBuilder()
.column("s1", "s1", "s4", "s5", "s5", "s1", "s3", "s2").build()) {
assertTablesAreEqual(expected, ret);
try (Table ret = t.sample(8, true, 0)) {
assertEquals(ret.getRowCount(), 8);
}
}
}
Expand Down

0 comments on commit 1e20830

Please sign in to comment.