Uploaded image for project: 'CarbonData'
  1. CarbonData
  2. CARBONDATA-2089

Test cases is incorrect because it always run success no matter whether the SQL thrown exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.0
    • 1.3.0
    • test
    • None

    Description

      Test cases is incorrect because it always run success no matter whether the SQL thrown exception,
      if the sql run success, then assert(false), and then catch exception and assert(true), so it always true.

      Test cases is incorrect,like:

        test("test timeseries create table seven") {
          try {
            sql(
              "create datamap agg0 on table mainTable using 'preaggregate' DMPROPERTIES ('timeseries.eventTime'='dataTime', 'timeseries.hierarchy'='hour=1,day=1,year=1,month=1') as select dataTime, sum(age) from mainTable group by dataTime")
            assert(false)
          } catch {
            case _:Exception =>
              assert(true)
          }
        }
      

      It will always run success.

      SDV have many similar test case, we need to fix it!

      Attachments

        Activity

          People

            xubo245 Bo Xu
            xubo245 Bo Xu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 4h 20m
                4h 20m