Uploaded image for project: 'Apache Lens (Retired)'
  1. Apache Lens (Retired)
  2. LENS-677 Test cases which will cause intermittent failures
  3. LENS-687

LauchTime is intermittently set to 0 in response of getStatus API for a successful finished query

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3
    • Component/s: api
    • Labels:
      None

      Description

      getQueryContext method at line[1] converts finished lens query to QueryContext object using toQueryContext method in FinishedLensQuery.class.

      toQueryContext method at line[2] does not set launch time in QueryContext object, due to which it defaults to 0.

      If a test case calls getStatus API on a already purged successful query, it gets a LensQuery object in which launch time is set to 0.

      This results in intermittent test failures. If query is not purged to Db, then test case gets proper launch time. If the query is already purged to Db, then test case gets launch time as 0 and fails.

      [1]: https://github.com/apache/incubator-lens/blob/apache-lens-2.2.0-beta-incubating/lens-server/src/main/java/org/apache/lens/server/query/QueryExecutionServiceImpl.java#L1643

      [2]: https://github.com/apache/incubator-lens/blob/apache-lens-2.2.0-beta-incubating/lens-server-api/src/main/java/org/apache/lens/server/api/query/FinishedLensQuery.java#L188

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                himanshu.gahlaut Himanshu Gahlaut
                Reporter:
                himanshu.gahlaut Himanshu Gahlaut
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: