Class MongoAssertions


  • public class MongoAssertions
    extends java.lang.Object
    Util class which needs to be in the same package as CalciteAssert due to package-private visibility.
    • Constructor Detail

      • MongoAssertions

        private MongoAssertions()
    • Method Detail

      • checkResultUnordered

        public static java.util.function.Consumer<java.sql.ResultSet> checkResultUnordered​(java.lang.String... lines)
        Similar to CalciteAssert.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 of useMongo().
        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)