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

CBL-C TestServer app - set array value unexpectedly store memory map id as value

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • None
    • CouchbaseLite
    • None

    Description

      I am adding a new test case: https://github.com/couchbaselabs/mobile-testkit/blob/fix/blob-testing/testsuites/CBLTester/CBL_Functional_tests/TestSetup_FunctionalTests/test_replication_for_blob.py#L16

      while running this test case, at test case source code line 63, I set an Array to the document,
      https://github.com/couchbaselabs/mobile-testkit/blob/fix/blob-testing/testsuites/CBLTester/CBL_Functional_tests/TestSetup_FunctionalTests/test_replication_for_blob.py#L63

      The document contains this:

      "channels": [
                          "@3_192.168.1.6_C"
                      ],
      

      I expect:

      "channels": [
                          "ABC"
                      ],
      

      in CBL-C testserver code, either array_addString in ArrayMethod.cpp or document_setArray in DocumentMethod.capp is related,

      https://github.com/couchbaselabs/mobile-testapps/blob/master/CBLClient/Apps/CBLTestServer-C/src/ArrayMethods.cpp#L30

      https://github.com/couchbaselabs/mobile-testapps/blob/master/CBLClient/Apps/CBLTestServer-C/src/DocumentMethods.cpp#L259

      Please help to check.

      here are the url and request body list:

      http://localhost:8080/document_create
      {'id': '"cbl_blob_CWW8Q"'}
      For url: http://localhost:8080/document_create Got response: "@2_192.168.1.6_C"
      http://localhost:8080/document_setString
      {'document': '"@2_192.168.1.6_C"', 'key': '"key1"', 'value': '"string value 1"'}
      For url: http://localhost:8080/document_setString Got response: "@2_192.168.1.6_C"
      http://localhost:8080/document_setString
      {'document': '"@2_192.168.1.6_C"', 'key': '"key2"', 'value': '"string value 2"'}
      For url: http://localhost:8080/document_setString Got response: "@2_192.168.1.6_C"
      http://localhost:8080/array_create
      {}
      For url: http://localhost:8080/array_create Got response: "@3_192.168.1.6_C"
      http://localhost:8080/array_addString
      {'array': '"@3_192.168.1.6_C"', 'value': '"ABC"'}
      For url: http://localhost:8080/array_addString Got response: ["\"ABC\""]
      http://localhost:8080/document_setArray
      {'document': '"@2_192.168.1.6_C"', 'key': '"channels"', 'value': '"@3_192.168.1.6_C"'}
      For url: http://localhost:8080/document_setArray Got response: "@2_192.168.1.6_C"
      http://localhost:8080/blob_createUTFBytesContent
      {'content': '"CBL blob testing string"'}
      For url: http://localhost:8080/blob_createUTFBytesContent Got response: "@4_192.168.1.6_C"
      http://localhost:8080/blob_create
      {'contentType': '"text/plain"', 'content': '"@4_192.168.1.6_C"'}
      For url: http://localhost:8080/blob_create Got response: "@5_192.168.1.6_C"
      http://localhost:8080/document_setBlob
      {'document': '"@2_192.168.1.6_C"', 'key': '"blob1"', 'value': '"@5_192.168.1.6_C"'}
      For url: http://localhost:8080/document_setBlob Got response: "@2_192.168.1.6_C"
      http://localhost:8080/database_save
      {'database': '"@1_192.168.1.6_C"', 'document': '"@2_192.168.1.6_C"'}
      For url: http://localhost:8080/database_save Got response: I-1
      
      

      Attachments

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

        Activity

          People

            eunice.huang Eunice Huang (Inactive)
            eunice.huang Eunice Huang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty