forked from sqlancer/sqlancer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestTiDBQPG.java
More file actions
24 lines (18 loc) · 810 Bytes
/
TestTiDBQPG.java
File metadata and controls
24 lines (18 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package sqlancer.qpg.tidb;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assumptions.assumeTrue;
import org.junit.jupiter.api.Test;
import sqlancer.Main;
import sqlancer.dbms.TestConfig;
public class TestTiDBQPG {
@Test
public void testTiDBQPG() {
String tiDB = System.getenv("TIDB_AVAILABLE");
boolean tiDBIsAvailable = tiDB != null && tiDB.equalsIgnoreCase("true");
assumeTrue(tiDBIsAvailable);
assertEquals(0,
Main.executeMain(new String[] { "--random-seed", "0", "--timeout-seconds", TestConfig.SECONDS,
"--num-threads", "1", "--qpg-enable", "true", "--num-queries", TestConfig.NUM_QUERIES, "tidb",
"--oracle", "QUERY_PARTITIONING" }));
}
}