Details
-
Task
-
Resolution: Done
-
Major
-
2.6.0
Description
SGW Version: Happening on 2.5.1-11 and 2.6.0 builds
Steps to reproduce :
- Create 2 SGW users
- Start multithreading
- one thread track all changes using rest api _changes
- 2nd thread try to add docs
- 3rd thread bring down the db in SGW
- 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":
,
"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