Skip to content

Commit 4384b20

Browse files
committed
[SLT] Run one single slt test on every merge
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
1 parent 34e2985 commit 4384b20

4 files changed

Lines changed: 25 additions & 1 deletion

File tree

.github/workflows/test-java.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ jobs:
5858
working-directory: ./sql-to-dbsp-compiler
5959
if: ${{ vars.CI_DRY_RUN != 'true' }}
6060

61+
- name: Run one quick SLT test
62+
if: ${{ vars.CI_DRY_RUN != 'true' }}
63+
run: mvn test --no-transfer-progress -q -B -Dsurefire.failIfNoSpecifiedTests=false -Dtest=RotateTests#quick
64+
working-directory: ./sql-to-dbsp-compiler
65+
6166
- name: Print sccache stats
6267
run: |
6368
sccache --show-stats

sql-to-dbsp-compiler/slt/src/main/java/org/dbsp/sqllogictest/Main.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,19 @@ public static void rotateTests() throws IOException, ClassNotFoundException {
8484
main(argv);
8585
}
8686

87+
/** Executes one SLT program, to make sure everything is fine */
88+
public static void quick() throws IOException, ClassNotFoundException {
89+
String[] args = new String[] { "-v", "-x", "-inc", "-e", "hybrid", "-skip", "1",
90+
"test/random/expr/slt_good_102.test" };
91+
92+
String wd = System.getProperty("user.dir");
93+
File directory = new File(wd + "/..").getAbsoluteFile();
94+
System.setProperty("user.dir", directory.getAbsolutePath());
95+
wd = System.getProperty("user.dir");
96+
System.out.println("working directory is " + wd);
97+
main(args);
98+
}
99+
87100
@SuppressWarnings("SpellCheckingInspection")
88101
public static void main(String[] argv) throws IOException, ClassNotFoundException {
89102
Class.forName("org.hsqldb.jdbcDriver");

sql-to-dbsp-compiler/slt/src/main/java/org/dbsp/sqllogictest/executors/DBSPExecutor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ static ProgramAndTester createTesterCode(
472472
}
473473
DBSPLetStatement step =
474474
new DBSPLetStatement("_",
475-
new DBSPApplyMethodExpression("step", DBSPTypeAny.getDefault(),
475+
new DBSPApplyMethodExpression("transaction", DBSPTypeAny.getDefault(),
476476
cas.getVarReference().field(0)).resultUnwrap());
477477
list.add(step);
478478
DBSPLetStatement outputStatement =
@@ -550,6 +550,7 @@ static ProgramAndTester createTesterCode(
550550
return new ProgramAndTester(circuit, function);
551551
}
552552

553+
@SuppressWarnings("UnusedReturnValue")
553554
public boolean statement(SltSqlStatement statement) throws SQLException {
554555
this.options.message("Executing " + statement + "\n", 2);
555556
String command = statement.statement.toLowerCase();

sql-to-dbsp-compiler/slt/src/test/java/org/dbsp/sqllogictest/RotateTests.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,9 @@ public class RotateTests {
1010
public void rotate() throws IOException, ClassNotFoundException {
1111
Main.rotateTests();
1212
}
13+
14+
@Test
15+
public void quick() throws IOException, ClassNotFoundException {
16+
Main.quick();
17+
}
1318
}

0 commit comments

Comments
 (0)