Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MINOR] Fix Frame tests for Github Actions #1993

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void castToFrame() {
double maxp1 = Integer.MAX_VALUE + 1.0;
MatrixBlock mb = TestUtils.generateTestMatrixBlock(100, 100, maxp1, maxp1, 1.0, 23);
FrameBlock f = DataConverter.convertToFrameBlock(mb);
assertTrue(f.getSchema()[0] == ValueType.INT64);
assertTrue(f.getSchema()[0] == ValueType.FP64);
}

@Test
Expand All @@ -50,8 +50,7 @@ public void castToFrame3() {
public void castErrorValue() {
MatrixBlock mb = new MatrixBlock(10, 10, Double.parseDouble("2.572306572E9"));
FrameBlock f = DataConverter.convertToFrameBlock(mb);
assertTrue(f.getSchema()[0] == ValueType.INT64);

assertTrue(f.getSchema()[0] == ValueType.FP64);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import org.junit.Test;

public class TransformFederatedEncodeDecodeTest extends AutomatedTestBase {
private static final Log LOG = LogFactory.getLog(TransformFederatedEncodeDecodeTest.class.getName());
protected static final Log LOG = LogFactory.getLog(TransformFederatedEncodeDecodeTest.class.getName());

private static final String TEST_NAME_RECODE = "TransformRecodeFederatedEncodeDecode";
private static final String TEST_NAME_DUMMY = "TransformDummyFederatedEncodeDecode";
Expand All @@ -61,30 +61,30 @@ public void setUp() {
new TestConfiguration(TEST_CLASS_DIR, TEST_NAME_RECODE, new String[] {"FO1", "FO2"}));
}

// @Test
// public void runComplexRecodeTestCSVDenseCP() {
// runTransformEncodeDecodeTest(true, false, Types.FileFormat.CSV);
// }
@Test
public void runComplexRecodeTestCSVDenseCP() {
runTransformEncodeDecodeTest(true, false, Types.FileFormat.CSV);
}

// @Test
// public void runComplexRecodeTestCSVSparseCP() {
// runTransformEncodeDecodeTest(true, true, Types.FileFormat.CSV);
// }
@Test
public void runComplexRecodeTestCSVSparseCP() {
runTransformEncodeDecodeTest(true, true, Types.FileFormat.CSV);
}

// @Test
// public void runComplexRecodeTestTextcellDenseCP() {
// runTransformEncodeDecodeTest(true, false, Types.FileFormat.TEXT);
// }
@Test
public void runComplexRecodeTestTextcellDenseCP() {
runTransformEncodeDecodeTest(true, false, Types.FileFormat.TEXT);
}

// @Test
// public void runComplexRecodeTestTextcellSparseCP() {
// runTransformEncodeDecodeTest(true, true, Types.FileFormat.TEXT);
// }
@Test
public void runComplexRecodeTestTextcellSparseCP() {
runTransformEncodeDecodeTest(true, true, Types.FileFormat.TEXT);
}

// @Test
// public void runComplexRecodeTestBinaryDenseCP() {
// runTransformEncodeDecodeTest(true, false, Types.FileFormat.BINARY);
// }
@Test
public void runComplexRecodeTestBinaryDenseCP() {
runTransformEncodeDecodeTest(true, false, Types.FileFormat.BINARY);
}

@Test
@Ignore
Expand All @@ -94,35 +94,35 @@ public void runComplexRecodeTestBinarySparseCP() {
runTransformEncodeDecodeTest(true, true, Types.FileFormat.BINARY);
}

// @Test
// public void runSimpleDummycodeTestCSVDenseCP() {
// runTransformEncodeDecodeTest(false, false, Types.FileFormat.CSV);
// }
@Test
public void runSimpleDummycodeTestCSVDenseCP() {
runTransformEncodeDecodeTest(false, false, Types.FileFormat.CSV);
}

// @Test
// public void runSimpleDummycodeTestCSVSparseCP() {
// runTransformEncodeDecodeTest(false, true, Types.FileFormat.CSV);
// }
@Test
public void runSimpleDummycodeTestCSVSparseCP() {
runTransformEncodeDecodeTest(false, true, Types.FileFormat.CSV);
}

// @Test
// public void runSimpleDummycodeTestTextDenseCP() {
// runTransformEncodeDecodeTest(false, false, Types.FileFormat.TEXT);
// }
@Test
public void runSimpleDummycodeTestTextDenseCP() {
runTransformEncodeDecodeTest(false, false, Types.FileFormat.TEXT);
}

// @Test
// public void runSimpleDummycodeTestTextSparseCP() {
// runTransformEncodeDecodeTest(false, true, Types.FileFormat.TEXT);
// }
@Test
public void runSimpleDummycodeTestTextSparseCP() {
runTransformEncodeDecodeTest(false, true, Types.FileFormat.TEXT);
}

// @Test
// public void runSimpleDummycodeTestBinaryDenseCP() {
// runTransformEncodeDecodeTest(false, false, Types.FileFormat.BINARY);
// }
@Test
public void runSimpleDummycodeTestBinaryDenseCP() {
runTransformEncodeDecodeTest(false, false, Types.FileFormat.BINARY);
}

// @Test
// public void runSimpleDummycodeTestBinarySparseCP() {
// runTransformEncodeDecodeTest(false, true, Types.FileFormat.BINARY);
// }
@Test
public void runSimpleDummycodeTestBinarySparseCP() {
runTransformEncodeDecodeTest(false, true, Types.FileFormat.BINARY);
}

private void runTransformEncodeDecodeTest(boolean recode, boolean sparse, Types.FileFormat format) {
ExecMode rtold = setExecMode(ExecMode.SINGLE_NODE);
Expand Down Expand Up @@ -172,8 +172,7 @@ private void runTransformEncodeDecodeTest(boolean recode, boolean sparse, Types.
"format=" + format.toString()};

// run test
// runTest(null);
LOG.error("\n" + runTest(null));
runTest(null);

// compare frame before and after encode and decode
FrameReader reader = FrameReaderFactory.createFrameReader(format);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private void runTransformEncodeDecodeTest(ExecType et, boolean sparse, String fm
SCRIPT_DIR + TEST_DIR + SPEC, output("FO")};

// run test
LOG.error(runTest(null));
runTest(null);

// compare matrices (values recoded to identical codes)
FrameReader reader = FrameReaderFactory.createFrameReader(FileFormat.safeValueOf(fmt));
Expand Down