Package org.apache.calcite.test
Class MongoAssertions
- java.lang.Object
-
- org.apache.calcite.test.MongoAssertions
-
public class MongoAssertions extends java.lang.Object
Util class which needs to be in the same package asCalciteAssert
due to package-private visibility.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
MongoAssertions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
assumeRealMongoInstance()
Used to skip tests if current instance is not mongo.static java.util.function.Consumer<java.sql.ResultSet>
checkResultUnordered(java.lang.String... lines)
Similar toCalciteAssert.checkResultUnordered(java.lang.String...)
, but filters strings before comparing them.static boolean
useFongo()
Checks wherever tests should use Fongo instead of Mongo.static boolean
useMongo()
Whether to run Mongo integration tests.
-
-
-
Method Detail
-
checkResultUnordered
public static java.util.function.Consumer<java.sql.ResultSet> checkResultUnordered(java.lang.String... lines)
Similar toCalciteAssert.checkResultUnordered(java.lang.String...)
, but filters strings before comparing them.- Parameters:
lines
- Expected expressions- Returns:
- validation function
-
useMongo
public static boolean useMongo()
Whether to run Mongo integration tests. Enabled by default, however test is only included if "it" profile is activated (-Pit
). To disable, specify-Dcalcite.test.mongodb=false
on the Java command line.- Returns:
- Whether current tests should use an external mongo instance
-
useFongo
public static boolean useFongo()
Checks wherever tests should use Fongo instead of Mongo. Opposite ofuseMongo()
.- Returns:
- Whether current tests should use embedded Fongo instance
-
assumeRealMongoInstance
public static void assumeRealMongoInstance()
Used to skip tests if current instance is not mongo. Some functionalities are not available in fongo.- See Also:
- Aggregation with $cond (172)
-
-