Skip to content

Commit 4d42dad

Browse files
authored
test cases for QPG (#670)
* testcase for QPG in SQLite * workflows: QPG Tests (SQLite)
1 parent d970f52 commit 4d42dad

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,23 @@ jobs:
272272
mvn -Dtest=TestSQLitePQS test
273273
mvn -Dtest=TestSQLite3 test
274274
275+
sqlite-qpg:
276+
name: QPG Tests (SQLite)
277+
runs-on: ubuntu-latest
278+
279+
steps:
280+
- uses: actions/checkout@v2
281+
with:
282+
fetch-depth: 0
283+
- name: Set up JDK 11
284+
uses: actions/setup-java@v1
285+
with:
286+
java-version: 11
287+
- name: Build
288+
run: mvn -B package -DskipTests=true
289+
- name: SQLite Tests for QPG
290+
run: |
291+
mvn -Dtest=TestSQLiteQPG test
275292
276293
tidb:
277294
name: DBMS Tests (TiDB)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package sqlancer.dbms;
2+
3+
import static org.junit.jupiter.api.Assertions.assertEquals;
4+
5+
import org.junit.jupiter.api.Test;
6+
7+
import sqlancer.Main;
8+
9+
public class TestSQLiteQPG {
10+
11+
@Test
12+
public void testSqliteQPG() {
13+
assertEquals(0, Main.executeMain(new String[] { "--random-seed", "0", "--timeout-seconds", TestConfig.SECONDS,
14+
"--num-threads", "1", "--num-queries", "1000", "--random-string-generation", "ALPHANUMERIC_SPECIALCHAR",
15+
"--database-prefix", "pqsdb" /* Workaround for connections not being closed */, "--qpg-enable", "true",
16+
"sqlite3", "--oracle", "NoREC", "--test-fts", "false", "--test-rtree", "false",
17+
"--test-check-constraints", "false", "--test-in-operator", "false" }));
18+
}
19+
20+
}

0 commit comments

Comments
 (0)