(venv) eunices-mbp:mobile-testkit eunicehuang$ pytest --timeout 3600 --liteserv-version=2.5.2.1-2 --liteserv-host=127.0.0.1 --liteserv-port=8080 --sync-gateway-version=2.5.0 --mode=cc --server-version=6.0.1-2037 --liteserv-platform=android --xattrs --no-conflicts --sg-ssl --delta-sync --create-db-per-test=cbl-test testsuites/CBLTester/CBL_Functional_tests/TestSetup_FunctionalTests -s -rsx -k test_delta_sync_replication[1-push-golden_gate_large.jpg-True] --enable-file-logging --skip-provisioning ================================================== test session starts =================================================== platform darwin -- Python 2.7.10, pytest-3.0.2, py-1.4.31, pluggy-0.3.1 -- /Users/eunicehuang/dev/mobile-testkit/venv/bin/python cachedir: .cache rootdir: /Users/eunicehuang/dev/mobile-testkit, inifile: pytest.ini plugins: timeout-1.0.0, html-1.10.0 collected 190 items testsuites/CBLTester/CBL_Functional_tests/TestSetup_FunctionalTests/test_delta_sync.py::test_delta_sync_replication[1-push-golden_gate_large.jpg-True] Downloading TestServer ... {u'load_generators': [], u'couchbase_servers': [{u'ip': u'10.100.174.151', u'name': u'cb1'}], u'sync_gateways': [{u'ip': u'10.100.172.178', u'name': u'sg1'}], u'environment': {u'delta_sync_enabled': True, u'x509_certs': False, u'sync_gateway_ssl': True, u'sg_lb_enabled': False, u'sg_use_views': False, u'cbl_log_decoder_platform': None, u'no_conflicts_enabled': True, u'xattrs_enabled': True, u'number_replicas': 0, u'sync_gateway_version': u'2.5.0', u'ipv6_enabled': False, u'cbs_ssl_enabled': False, u'server_version': u'6.0.1-2037'}, u'hosts': [{u'ip': u'10.100.174.151', u'name': u'host1'}, {u'ip': u'10.100.172.178', u'name': u'host2'}], u'load_balancers': [], u'sg_accels': []} Extracted host (10.100.172.178) from url (https://10.100.172.178:4984) Enabling SSL on sync gateway Running tests with load balancer disabled Running test with server version 6.0.1-2037 Running test with sync_gateway version 2.5.0 Running test with cbl_log_decoder_platform None Running test with cbl_log_decoder_platform None Running test with xattrs for sync meta storage Running with no conflicts Running tests with cbs <-> sg ssl disabled Running with delta sync {u'load_generators': [], u'couchbase_servers': [{u'ip': u'10.100.174.151', u'name': u'cb1'}], u'sync_gateways': [{u'ip': u'10.100.172.178', u'name': u'sg1'}], u'environment': {u'delta_sync_enabled': True, u'x509_certs': False, u'sync_gateway_ssl': True, u'sg_lb_enabled': False, u'sg_use_views': False, u'cbl_log_decoder_platform': None, u'no_conflicts_enabled': True, u'xattrs_enabled': True, u'number_replicas': 0, u'sync_gateway_version': u'2.5.0', u'ipv6_enabled': False, u'cbs_ssl_enabled': False, u'server_version': u'6.0.1-2037'}, u'hosts': [{u'ip': u'10.100.174.151', u'name': u'host1'}, {u'ip': u'10.100.172.178', u'name': u'host2'}], u'load_balancers': [], u'sg_accels': []} Extracted host (10.100.174.151) from url (http://10.100.174.151:8091) Verfying versions for cluster: resources/cluster_configs/base_cc GET http://Administrator:password@10.100.174.151:8091/pools 200 Expected Server Version: 6.0.1-2037 Running Server Version: 6.0.1-2037 GET https://10.100.172.178:4984/ 200 'server' header: Couchbase Sync Gateway/2.5.0 EE vendor name: Couchbase Sync Gateway GET https://10.100.172.178:4984/ 200 Expected sync_gateway Version: 2.5.0-271 Running sync_gateway Version: 2.5.0-271 Running sync_gateway Vendor Version: 2.5 {u'load_generators': [], u'couchbase_servers': [{u'ip': u'10.100.174.151', u'name': u'cb1'}], u'sync_gateways': [{u'ip': u'10.100.172.178', u'name': u'sg1'}], u'environment': {u'delta_sync_enabled': True, u'x509_certs': False, u'sync_gateway_ssl': True, u'sg_lb_enabled': False, u'sg_use_views': False, u'cbl_log_decoder_platform': None, u'no_conflicts_enabled': True, u'xattrs_enabled': True, u'number_replicas': 0, u'sync_gateway_version': u'2.5.0', u'ipv6_enabled': False, u'cbs_ssl_enabled': False, u'server_version': u'6.0.1-2037'}, u'hosts': [{u'ip': u'10.100.174.151', u'name': u'host1'}, {u'ip': u'10.100.172.178', u'name': u'host2'}], u'load_balancers': [], u'sg_accels': []} Running test 'test_delta_sync_replication[1-push-golden_gate_large.jpg-True]' cluster_config: resources/cluster_configs/base_cc cluster_topology: {'load_balancers': [], 'sg_accels': [], 'sync_gateways': [{'admin': 'https://10.100.172.178:4985', 'public': 'https://10.100.172.178:4984'}], 'couchbase_servers': ['http://10.100.174.151:8091']} mode: cc xattrs_enabled: True Got response: @1_192.168.232.2_android Log files available at - /data/user/0/com.couchbase.TestServerApp/files/logs_1562798207 Creating a Database cbl-test1562798208.03 at test setup Got response: @2_192.168.232.2_android Got response: @3_192.168.232.2_android Getting the database name Got response: "cbl-test1562798208.03" resources/cluster_configs/base_cc cbs: ['http://10.100.174.151:8091'] sgs: [{'ip': u'10.100.172.178', 'name': u'sg1'}] acs: [] ssl: False >>> Reseting cluster ... >>> CBS SSL enabled: False >>> Using xattrs: True >>> Stopping sync_gateway Running playbook: libraries/provision/ansible/playbooks/stop-sync-gateway.yml PLAY [sync_gateways] *********************************************************** TASK [setup] ******************************************************************* ok: [sg1] TASK [SYNC GATEWAY | Stop sync_gateway service] ******************************** changed: [sg1] TASK [SYNC GATEWAY | Stop sync_gateway for CentOS 6] *************************** skipping: [sg1] TASK [SYNC GATEWAY | Verify sync_gateway not listening on port] **************** ok: [sg1] TASK [SYNC GATEWAY | Stop sync_gateway service on Windows] ********************* skipping: [sg1] PLAY RECAP ********************************************************************* sg1 : ok=3 changed=1 unreachable=0 failed=0 >>> Stopping sg_accel Running playbook: libraries/provision/ansible/playbooks/stop-sg-accel.yml PLAY RECAP ********************************************************************* >>> Deleting sync_gateway artifacts Running playbook: libraries/provision/ansible/playbooks/delete-sync-gateway-artifacts.yml PLAY [sync_gateways] *********************************************************** TASK [setup] ******************************************************************* ok: [sg1] TASK [SYNC GATEWAY | Delete sync_gateway logs] ********************************* changed: [sg1] [WARNING]: Consider using file module with state=absent rather than running rm TASK [SYNC GATEWAY | Delete sync_gateway logs on Windows] ********************** skipping: [sg1] TASK [SYNC GATEWAY | Create sync_gateway logs directory on Windows] ************ skipping: [sg1] TASK [SYNC GATEWAY | Delete sync_gateway logs on Windows] ********************** skipping: [sg1] TASK [SYNC GATEWAY | Delete sync_gateway logs directory under Temp on Windows] * skipping: [sg1] TASK [SYNC GATEWAY | Delete sync_gateway logs on Windows] ********************** skipping: [sg1] TASK [SYNC GATEWAY | Create sync_gateway logs directory under c:/tmp on Windows] *** skipping: [sg1] PLAY RECAP ********************************************************************* sg1 : ok=2 changed=1 unreachable=0 failed=0 >>> Deleting sg_accel artifacts Running playbook: libraries/provision/ansible/playbooks/delete-sg-accel-artifacts.yml PLAY RECAP ********************************************************************* >>> Deleting buckets on: http://10.100.174.151:8091 GET http://10.100.174.151:8091/pools/default/buckets 200 Found buckets: [u'travel-sample'] Existing buckets: [u'travel-sample'] Deleting buckets: [u'travel-sample'] GET http://Administrator:password@10.100.174.151:8091/pools 200 Deleting RBAC user travel-sample DELETE http://10.100.174.151:8091/settings/rbac/users/local/travel-sample 200 DELETE http://10.100.174.151:8091/pools/default/buckets/travel-sample 200 GET http://10.100.174.151:8091/pools/default/buckets 200 Found buckets: [] >>> Creating buckets on: http://10.100.174.151:8091 >>> Creating buckets [u'travel-sample'] Creating buckets: [u'travel-sample'] total_avail_ram_mb: 3789 effective_avail_ram_mb: 2519 Creating bucket travel-sample with RAM 2519 GET http://Administrator:password@10.100.174.151:8091/pools 200 POST http://10.100.174.151:8091/pools/default/buckets 202 Creating RBAC user travel-sample with password password and roles ro_admin,bucket_full_access[travel-sample] PUT http://10.100.174.151:8091/settings/rbac/users/local/travel-sample 200 Key not found error: Bucket is ready! GET http://10.100.174.151:8091/pools/nodes 200 Node is still not healthy. Status: warmup Retrying ... GET http://10.100.174.151:8091/pools/nodes 200 All nodes are healthy >>> Waiting for Server: http://10.100.174.151:8091 to be in a healthy state GET http://10.100.174.151:8091/pools/nodes 200 All nodes are healthy >>> Starting sync_gateway with configuration: /Users/eunicehuang/dev/mobile-testkit/resources/sync_gateway_configs/sync_gateway_travel_sample_cc.json Keyerror in getting loggingredactlevel revs_limit not found in resources/cluster_configs/base_cc, Ignoring Running playbook: libraries/provision/ansible/playbooks/start-sync-gateway.yml [WARNING]: While constructing a mapping from /Users/eunicehuang/dev/mobile-testkit/libraries/provision/ansible/playbooks /start-sync-gateway.yml, line 23, column 5, found a duplicate dict key (sudo). Using last defined value only. [DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and make sure become_method is 'sudo' (default). This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. PLAY [sync_gateways] *********************************************************** TASK [setup] ******************************************************************* ok: [sg1] TASK [SYNC GATEWAY | Copy sync gateway config to host] ************************* changed: [sg1] TASK [Deleting /home/sync_gateway/certs directory] ***************************** skipping: [sg1] TASK [Deleting /home/sync_gateway/certs.zip] *********************************** skipping: [sg1] TASK [Copying certs.zip to /home/sync_gateway directory] *********************** skipping: [sg1] TASK [Unzipping certs.zip] ***************************************************** skipping: [sg1] TASK [SYNC GATEWAY | Check deployed config] ************************************ changed: [sg1] TASK [SYNC GATEWAY | Print deployed config] ************************************ ok: [sg1] => { "out.stdout": { "SSLCert": "sg_cert.pem", "SSLKey": "sg_privkey.pem", "adminInterface": "0.0.0.0:4985", "compressResponses": false, "databases": { "db": { "allow_conflicts": false, "bucket": "travel-sample", "delta_sync": { "enabled": true }, "enable_shared_bucket_access": true, "import_docs": "continuous", "num_index_replicas": 0, "password": "password", "server": "http://10.100.174.151:8091", "username": "travel-sample" } }, "interface": ":4984", "logging": { "debug": { "enabled": true } }, "maxCouchbaseConnections": 16, "maxFileDescriptors": 90000, "maxIncomingConnections": 0 } } TASK [SYNC GATEWAY | Deploying SSL Cert] *************************************** changed: [sg1] TASK [SYNC GATEWAY | Deploying SSL Private Key] ******************************** changed: [sg1] TASK [SYNC GATEWAY | Check if C:\PROGRA~2\Couchbase is present on Windows] ***** skipping: [sg1] TASK [SYNC GATEWAY | Copy sync gateway config to C:\PROGRA~2\Couchbase] ******** skipping: [sg1] TASK [SYNC GATEWAY | Check deployed config C:\PROGRA~2\Couchbase\serviceconfig.json] *** skipping: [sg1] TASK [SYNC GATEWAY | Check if C:\PROGRA~1\Couchbase\Sync Gateway is present on Windows] *** skipping: [sg1] TASK [SYNC GATEWAY | Copy sync gateway config to C:\PROGRA~1\Couchbase\Sync Gateway] *** skipping: [sg1] TASK [SYNC GATEWAY | Check deployed config C:\PROGRA~1\Couchbase\Sync Gateway\serviceconfig.json] *** skipping: [sg1] TASK [SYNC GATEWAY | Print deployed config] ************************************ skipping: [sg1] PLAY [sync_gateways] *********************************************************** TASK [setup] ******************************************************************* ok: [sg1] TASK [debug] ******************************************************************* ok: [sg1] => { "msg": "Starting sync_gateway" } TASK [SYNC GATEWAY | Start sync gateway service] ******************************* changed: [sg1] TASK [SYNC GATEWAY | Wait until sync gateway to listen on port] **************** ok: [sg1] TASK [debug] ******************************************************************* skipping: [sg1] TASK [SYNC GATEWAY | Start sync_gateway service on Windows] ******************** skipping: [sg1] TASK [SYNC GATEWAY | Wait until sync gateway to listen on port] **************** skipping: [sg1] PLAY RECAP ********************************************************************* sg1 : ok=10 changed=5 unreachable=0 failed=0 >>> Running in channel cache 2019-07-10 15:37:22,852 - INFO - restart - >>> Restarting sync_gateway with configuration: /Users/eunicehuang/dev/mobile-testkit/resources/sync_gateway_configs/sync_gateway_travel_sample_cc.json INFO:test_framework:>>> Restarting sync_gateway with configuration: /Users/eunicehuang/dev/mobile-testkit/resources/sync_gateway_configs/sync_gateway_travel_sample_cc.json Keyerror in getting loggingredactlevel revs_limit no found in resources/cluster_configs/temp_cluster_config_cc, Ignoring Running playbook: libraries/provision/ansible/playbooks/reset-sync-gateway.yml PLAY [sync_gateways] *********************************************************** TASK [setup] ******************************************************************* ok: [sg1] TASK [SYNC GATEWAY | Stop sync_gateway service] ******************************** changed: [sg1] TASK [SYNC GATEWAY | Stop sync_gateway for CentOS 6] *************************** skipping: [sg1] TASK [SYNC GATEWAY | Verify sync_gateway not listening on port] **************** ok: [sg1] TASK [SYNC GATEWAY | Stop sync_gateway service on Windows] ********************* skipping: [sg1] TASK [SYNC GATEWAY | Delete sync_gateway logs] ********************************* changed: [sg1] TASK [SYNC GATEWAY | Delete sync_gateway logs on Windows] ********************** skipping: [sg1] TASK [SYNC GATEWAY | Create sync_gateway logs directory on Windows] ************ skipping: [sg1] TASK [SYNC GATEWAY | Delete sync_gateway logs on Windows] ********************** skipping: [sg1] TASK [SYNC GATEWAY | Delete sync_gateway logs directory under Temp on Windows] * skipping: [sg1] TASK [SYNC GATEWAY | Delete sync_gateway logs on Windows] ********************** skipping: [sg1] TASK [SYNC GATEWAY | Create sync_gateway logs directory under c:/tmp on Windows] *** skipping: [sg1] PLAY [sync_gateways] *********************************************************** TASK [setup] ******************************************************************* ok: [sg1] TASK [SYNC GATEWAY | Copy sync gateway config to host] ************************* changed: [sg1] TASK [Deleting /home/sync_gateway/certs directory] ***************************** skipping: [sg1] TASK [Deleting /home/sync_gateway/certs.zip] *********************************** skipping: [sg1] TASK [Copying certs.zip to /home/sync_gateway directory] *********************** skipping: [sg1] TASK [Unzipping certs.zip] ***************************************************** skipping: [sg1] TASK [SYNC GATEWAY | Check deployed config] ************************************ changed: [sg1] TASK [SYNC GATEWAY | Print deployed config] ************************************ ok: [sg1] => { "out.stdout": { "SSLCert": "sg_cert.pem", "SSLKey": "sg_privkey.pem", "adminInterface": "0.0.0.0:4985", "compressResponses": false, "databases": { "db": { "allow_conflicts": false, "bucket": "travel-sample", "delta_sync": { "enabled": true }, "enable_shared_bucket_access": true, "import_docs": "continuous", "num_index_replicas": 0, "password": "password", "server": "http://10.100.174.151:8091", "username": "travel-sample" } }, "interface": ":4984", "logging": { "debug": { "enabled": true } }, "maxCouchbaseConnections": 16, "maxFileDescriptors": 90000, "maxIncomingConnections": 0 } } TASK [SYNC GATEWAY | Deploying SSL Cert] *************************************** changed: [sg1] TASK [SYNC GATEWAY | Deploying SSL Private Key] ******************************** changed: [sg1] TASK [SYNC GATEWAY | Check if C:\PROGRA~2\Couchbase is present on Windows] ***** skipping: [sg1] TASK [SYNC GATEWAY | Copy sync gateway config to C:\PROGRA~2\Couchbase] ******** skipping: [sg1] TASK [SYNC GATEWAY | Check deployed config C:\PROGRA~2\Couchbase\serviceconfig.json] *** skipping: [sg1] TASK [SYNC GATEWAY | Check if C:\PROGRA~1\Couchbase\Sync Gateway is present on Windows] *** skipping: [sg1] TASK [SYNC GATEWAY | Copy sync gateway config to C:\PROGRA~1\Couchbase\Sync Gateway] *** skipping: [sg1] TASK [SYNC GATEWAY | Check deployed config C:\PROGRA~1\Couchbase\Sync Gateway\serviceconfig.json] *** skipping: [sg1] TASK [SYNC GATEWAY | Print deployed config] ************************************ skipping: [sg1] PLAY [sync_gateways] *********************************************************** TASK [setup] ******************************************************************* ok: [sg1] TASK [debug] ******************************************************************* ok: [sg1] => { "msg": "Starting sync_gateway" } TASK [SYNC GATEWAY | Start sync gateway service] ******************************* changed: [sg1] TASK [SYNC GATEWAY | Wait until sync gateway to listen on port] **************** ok: [sg1] TASK [debug] ******************************************************************* skipping: [sg1] TASK [SYNC GATEWAY | Start sync_gateway service on Windows] ******************** skipping: [sg1] TASK [SYNC GATEWAY | Wait until sync gateway to listen on port] **************** skipping: [sg1] PLAY RECAP ********************************************************************* sg1 : ok=14 changed=7 unreachable=0 failed=0 POST https://10.100.172.178:4985/db/_user/ 201 POST https://10.100.172.178:4985/db/_session 200 cookie name SyncGatewaySession, session id 74b5fdba5c40421b121608011c57f8885999a502 PUT 1 docs to with prefix cbl_sync Got response: I-1 Got response: @4_192.168.232.2_android Got response: @5_192.168.232.2_android Got response: @6_192.168.232.2_android Got response: I-1 Got response: "connecting" Activity level: connecting Got response: I-1 Got response: "idle" Got response: L216 Got response: L216 Activity level: idle Got response: L216 Got response: L216 Got response: I-1 Got response: "busy" Got response: "stopped" Got response: "stopped" GET https://10.100.172.178:4985/_expvar 200 GET https://10.100.172.178:4985/db/_all_docs?include_docs=true 200 Got response: L1 GET https://10.100.172.178:4984/db/cbl_sync_0?conflicts=true&revs=true&show_exp=true 200 Updating https://10.100.172.178:4984/db/cbl_sync_0: 1 times Loading attachment from file: resources/data/golden_gate_large.jpg Got response: @7_192.168.232.2_android Got response: @8_192.168.232.2_android Got response: I-1 Got response: "busy" Activity level: busy Got response: I-1 Got response: "idle" Got response: L1 Got response: L1 Activity level: idle Got response: L1 Got response: L1 Got response: I-1 Got response: "busy" Got response: "stopped" Got response: "stopped" GET https://10.100.172.178:4985/_expvar 200 Got response: ["\"cbl_sync_0\""] Got response: @9_192.168.232.2_android FAILEDTearing down test Deleting the database cbl-test at test teardown Got response: true Got response: I-1 Flushing server memory Got response: I-1 Stopping the test server per test Clearing png files in resources/data --------------------- generated xml file: /Users/eunicehuang/dev/mobile-testkit/results/results.xml ---------------------- --------------------- generated html file: /Users/eunicehuang/dev/mobile-testkit/results/report.html --------------------- ======================================================== FAILURES ======================================================== _____________________________ test_delta_sync_replication[1-push-golden_gate_large.jpg-True] _____________________________ params_from_base_test_setup = {'base_url': 'http://127.0.0.1:8080', 'cbl_db': 'cbl-test1562798208.03', 'cbl_log_decoder_build': None, 'cbl_log_decoder_platform': None, ...} num_of_docs = 1, replication_type = 'push', file_attachment = 'golden_gate_large.jpg', continuous = True @pytest.mark.sanity @pytest.mark.listener @pytest.mark.syncgateway @pytest.mark.replication @pytest.mark.parametrize("num_of_docs, replication_type, file_attachment, continuous", [ (10, "pull", None, True), (10, "pull", "sample_text.txt", True), (1, "push", "golden_gate_large.jpg", True), (10, "push", None, True) ]) def test_delta_sync_replication(params_from_base_test_setup, num_of_docs, replication_type, file_attachment, continuous): ''' @summary: 1. Create docs in CBL 2. Do push_pull replication 3. update docs in SGW with/without attachment 4. Do push/pull replication 5. Verify delta sync stats shows bandwidth saving, replication count, number of docs updated using delta sync ''' sg_db = "db" sg_url = params_from_base_test_setup["sg_url"] sg_admin_url = params_from_base_test_setup["sg_admin_url"] cluster_config = params_from_base_test_setup["cluster_config"] sg_blip_url = params_from_base_test_setup["target_url"] base_url = params_from_base_test_setup["base_url"] sg_config = params_from_base_test_setup["sg_config"] db = params_from_base_test_setup["db"] cbl_db = params_from_base_test_setup["source_db"] liteserv_platform = params_from_base_test_setup["liteserv_platform"] sync_gateway_version = params_from_base_test_setup["sync_gateway_version"] mode = params_from_base_test_setup["mode"] if sync_gateway_version < "2.5.0": pytest.skip('This test cannnot run with sg version below 2.5') channels = ["ABC"] username = "autotest" password = "password" number_of_updates = 1 blob = Blob(base_url) dictionary = Dictionary(base_url) # Reset cluster to ensure no data in system c = cluster.Cluster(config=cluster_config) c.reset(sg_config_path=sg_config) enable_delta_sync(c, sg_config, cluster_config, mode, True) sg_client = MobileRestClient() sg_client.create_user(sg_admin_url, sg_db, username, password=password, channels=channels) cookie, session_id = sg_client.create_session(sg_admin_url, sg_db, username) session = cookie, session_id # 1. Create docs in CBL db.create_bulk_docs(num_of_docs, "cbl_sync", db=cbl_db, channels=channels) # 2. Do push replication replicator = Replication(base_url) authenticator = Authenticator(base_url) replicator_authenticator = authenticator.authentication(session_id, cookie, authentication_type="session") repl = replicator.configure_and_replicate(source_db=cbl_db, target_url=sg_blip_url, continuous=continuous, replicator_authenticator=replicator_authenticator, replication_type="push") replicator.stop(repl) doc_reads_bytes, doc_writes_bytes = get_net_stats(sg_client, sg_admin_url) sg_docs = sg_client.get_all_docs(url=sg_admin_url, db=sg_db, include_docs=True)["rows"] # Verify database doc counts cbl_doc_count = db.getCount(cbl_db) assert len(sg_docs) == cbl_doc_count, "Expected number of docs does not exist in sync-gateway after replication" # 3. update docs in SGW with/without attachment for doc in sg_docs: sg_client.update_doc(url=sg_url, db=sg_db, doc_id=doc["id"], number_updates=1, auth=session, channels=channels, attachment_name=file_attachment) repl = replicator.configure_and_replicate(source_db=cbl_db, target_url=sg_blip_url, continuous=continuous, replicator_authenticator=replicator_authenticator, replication_type="pull") replicator.stop(repl) doc_reads_bytes1, doc_writes_bytes1 = get_net_stats(sg_client, sg_admin_url) delta_size = doc_reads_bytes1 assert delta_size < doc_writes_bytes, "did not replicate just delta" if replication_type == "push": doc_ids = db.getDocIds(cbl_db) cbl_db_docs = db.getDocuments(cbl_db, doc_ids) for doc_id, doc_body in cbl_db_docs.items(): for i in range(number_of_updates): if file_attachment: mutable_dictionary = dictionary.toMutableDictionary(doc_body) dictionary.setString(mutable_dictionary, "new_field_1", random_string(length=30)) dictionary.setString(mutable_dictionary, "new_field_2", random_string(length=80)) if liteserv_platform == "android": > blob_value = blob.create("image/jpeg", blob.createImageContent("/assets/golden_gate_large.jpg")) testsuites/CBLTester/CBL_Functional_tests/TestSetup_FunctionalTests/test_delta_sync.py:108: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ CBLClient/Blob.py:29: in create return self._client.invokeMethod("blob_create", args) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , method = 'blob_create' args = def invokeMethod(self, method, args=None): resp = Response() try: # Create body from args. body = {} url = self.base_url + "/" + method if args: for k, v in args: val = ValueSerializer.serialize(v) body[k] = val # Create connection to method endpoint. headers = {"Content-Type": "application/json"} self.session.headers = headers resp = self.session.post(url, data=json.dumps(body)) resp.raise_for_status() responseCode = resp.status_code if responseCode == 200: result = resp.content if len(result) < 25: # Only print short messages log_info("Got response: {}".format(result)) return ValueSerializer.deserialize(result) except Exception as err: if resp.content: > raise Exception(str(err) + resp.content) E Exception: 400 Client Error: Bad Request for url: http://127.0.0.1:8080/blob_createjava.lang.reflect.InvocationTargetException E at java.lang.reflect.Method.invoke(Native Method) E at com.couchbase.CouchbaseLiteServ.server.Server.handle(Server.java:212) E at org.nanohttpd.protocols.http.HTTPSession.execute(HTTPSession.java:418) E at org.nanohttpd.protocols.http.ClientHandler.run(ClientHandler.java:75) E at java.lang.Thread.run(Thread.java:764) E Caused by: java.lang.ClassCastException: libcore.io.ClassPathURLStreamHandler$ClassPathURLConnection$1 cannot be cast to byte[] E at com.couchbase.CouchbaseLiteServ.server.RequestHandler.BlobRequestHandler.create(BlobRequestHandler.java:17) E ... 5 more CBLClient/Client.py:44: Exception ================================================== 189 tests deselected ================================================== ======================================= 1 failed, 189 deselected in 78.39 seconds ======================================== (venv) eunices-mbp:mobile-testkit eunicehuang$