Uploaded image for project: 'Couchbase Mobile'
  1. Couchbase Mobile
  2. CM-1170

Investigate and fix test failure in test_live_query_response_delay_time

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • Major
    • None
    • None
    • None

    Description

      The failure:

       

      Error MessageAssertionError: delay timer cannot be longer than 300 millionsec assert 382 < 300Stacktraceparams_from_base_suite_setup = {'base_url': 'http://10.100.150.138:8080', 'cbl_ce': False, 'cbl_log_decoder_build': None, 'cbl_log_decoder_platform': None, ...}
       
          def test_live_query_response_delay_time(params_from_base_suite_setup):
              """
              note: this test case is for android/java only
              1. call /query_getLiveQueryResponseTime to get delay timer
              2. validate delay timer is less than 200 millisecond
              """
              base_url = params_from_base_suite_setup["base_url"]
              db = params_from_base_suite_setup["suite_db"]
              cbl_db = params_from_base_suite_setup["suite_source_db"]
              liteserv_platform = params_from_base_suite_setup["liteserv_platform"]
          
              if liteserv_platform in ["ios", "net-msft", "net-uwp", "xamarin-ios", "xamarin-android"]:
                  pytest.skip('This test case is for android/java only')
          
              channels = ["live-query"]
              num_of_docs = 100
              db.create_bulk_docs(num_of_docs, "live-query-doc", db=cbl_db, channels=channels)
          
              doc_ids = db.getDocIds(cbl_db)
              docs = db.getDocuments(cbl_db, doc_ids)
              seq_num = 1
              for doc_id, doc_body in docs.items():
                  if "live-query-doc" in doc_id:
                      doc_body["sequence_number"] = seq_num
                      db.updateDocument(database=cbl_db, data=doc_body, doc_id=doc_id)
                      seq_num += 1
          
              qy = Query(base_url)
              delay_timer = qy.query_get_live_query_delay_time(cbl_db)
              log_info("delay_timer is counted as {}".format(delay_timer))
      >       assert delay_timer < 300, "delay timer cannot be longer than 300 millionsec"
      E       AssertionError: delay timer cannot be longer than 300 millionsec
      E       assert 382 < 300 

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            gilad.kalchheim Gilad Kalchheim
            gilad.kalchheim Gilad Kalchheim
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty