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

windows - add docs not throwing 503 error when db is offline

    XMLWordPrintable

Details

    Description

      SGW Version:  Happening on 2.5.1-11 and 2.6.0 builds

      Steps to reproduce :

      1. Create 2 SGW users 
      2. Start multithreading 
        1. one thread track all changes using rest api _changes
        2. 2nd thread try to add docs
        3. 3rd thread bring down the db in SGW
      3. When db is offline, 2nd thread should throw an error 503 

       seeing this issue while collecting errors 

      Actual :

      It is not throwing an error 

      Expected :

      It should throw 503 error 

       

       

      Test in github: 
      test_online_to_offline_changes_feed_controlled_close_longpoll
      [ https://github.com/couchbaselabs/mobile-testkit/blob/master/testsuites/syncgateway/functional/tests/test_db_online_offline.py#L302|https://github.com/couchbaselabs/mobile-testkit/blob/master/testsuites/syncgateway/functional/tests/test_db_online_offline.py#L435]
       
      To set up the test to run on windows :
      Modify pool.json 
      {
      "ip_to_node_type":

      { "172.23.104.144": "couchbase_servers", "172.23.121.2": "sync_gateways" .  }

      ,
      "ips": [
      "172.23.104.144",
      "172.23.121.2"
      ]
      }
      Note : SGW ip is windows VM, Server can be centos VM
      #2 . Run these following command to replace with windows username and password . 
      sed -i -re s/FakeUser/Administrator/ libraries/utilities/generate_clusters_from_pool.py
      sed -i -re s/FakePassword/Membase123/ libraries/utilities/generate_clusters_from_pool.py
       
      Also check what port ansible is running on your windows VM. In my case , it is '5986'. So I have to replace port to 5986 on generate cluster from pool 
       
      #3. Then run this command to generate pool for windows
      python libraries/utilities/generate_clusters_from_pool.py --sg-windows --sg-accel-windows
       
      #4. Run the test 
      pytest -s -rsx --timeout=4500 --mode=cc --server-version=6.0.1-2037 --sync-gateway-version=2.6.0-117 testsuites/syncgateway/functional/tests/ --sa-platform=windows --sg-platform=windows --xattrs -k test_online_to_offline_changes_feed_controlled_close_longpoll[bucket_online_offline/bucket_online_offline_default-5000]

      sg_collect logs attached 

      Attachments

        Activity

          People

            sridevi.saragadam Sridevi Saragadam (Inactive)
            sridevi.saragadam Sridevi Saragadam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty