Skip to content

Commit 74d9514

Browse files
committed
[CockroachDB] Use the composite test oracle rather than a custom implementation
1 parent 0d06637 commit 74d9514

File tree

2 files changed

+11
-34
lines changed

2 files changed

+11
-34
lines changed

src/sqlancer/cockroachdb/CockroachDBOptions.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
package sqlancer.cockroachdb;
22

33
import java.sql.SQLException;
4+
import java.util.ArrayList;
5+
import java.util.List;
46

57
import com.beust.jcommander.Parameter;
68
import com.beust.jcommander.Parameters;
79

10+
import sqlancer.CompositeTestOracle;
811
import sqlancer.TestOracle;
912
import sqlancer.cockroachdb.CockroachDBProvider.CockroachDBGlobalState;
1013
import sqlancer.cockroachdb.oracle.CockroachDBNoRECOracle;
@@ -14,7 +17,6 @@
1417
import sqlancer.cockroachdb.oracle.tlp.CockroachDBTLPGroupByOracle;
1518
import sqlancer.cockroachdb.oracle.tlp.CockroachDBTLPHavingOracle;
1619
import sqlancer.cockroachdb.oracle.tlp.CockroachDBTLPJoinOracle;
17-
import sqlancer.cockroachdb.oracle.tlp.CockroachDBTLPOracle;
1820
import sqlancer.cockroachdb.oracle.tlp.CockroachDBTLPWhereOracle;
1921

2022
@Parameters(separators = "=", commandDescription = "Test CockroachDB")
@@ -77,7 +79,14 @@ public TestOracle create(CockroachDBGlobalState globalState) throws SQLException
7779
QUERY_PARTITIONING {
7880
@Override
7981
public TestOracle create(CockroachDBGlobalState globalState) throws SQLException {
80-
return new CockroachDBTLPOracle(globalState);
82+
List<TestOracle> oracles = new ArrayList<>();
83+
oracles.add(new CockroachDBTLPAggregateOracle(globalState));
84+
oracles.add(new CockroachDBTLPHavingOracle(globalState));
85+
oracles.add(new CockroachDBTLPWhereOracle(globalState));
86+
oracles.add(new CockroachDBTLPGroupByOracle(globalState));
87+
oracles.add(new CockroachDBTLPExtendedWhereOracle(globalState));
88+
oracles.add(new CockroachDBTLPDistinctOracle(globalState));
89+
return new CompositeTestOracle(oracles);
8190
}
8291
};
8392

src/sqlancer/cockroachdb/oracle/tlp/CockroachDBTLPOracle.java

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)