Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2 Beta-2, 1.2 Beta-3, 1.2.0
    • Fix Version/s: 1.3.0
    • Component/s: library
    • Labels:
      None
    # Subject Project Status CR V
    For Gerrit Dashboard: &For+NCBC-174=message:NCBC-174

      Activity

      john John Zablocki (Inactive) created issue -
      john John Zablocki (Inactive) made changes -
      Field Original Value New Value
      Summary Fix failing tests in NUnit project. Fix invalid tests in NUnit project.
      Fix Version/s 1.2.1 [ 10441 ]
      Fix Version/s 1.2.0 [ 10298 ]
      Affects Version/s 1.2.0 [ 10298 ]
      john John Zablocki (Inactive) made changes -
      Fix Version/s 1.2.2 [ 10472 ]
      Fix Version/s 1.2.1 [ 10441 ]
      Hide
      saakshi.manocha Saakshi Manocha added a comment - - edited

      I ran the .net unit tests against the latest code of couchbase-net-client and cluster version 2.0.0-1976
      My cluster config comprise of the following nodes:
      10.3.121.134
      10.3.121.135
      10.3.121.136
      10.3.3.206

      Some of the tests are failing, mostly are related to views. Please find the observations and their possible causes:

      1. CouchbaseAuthenticatedViewTests\When_Bucket_Is_Authenticated_View_Returns_Results :

      First the test was failing because there was no document getting created in "authenticated" bucket. Supposedly the code was creating the default client object in method CouchbaseClientFactory.CreateCouchbaseClient(), where the bucket name is default. So I changed it the initialization statement to :
      _client = new CouchbaseClient("authenticated","secret");
      Again running the test, now the documents are getting created for "authenticated" bucket but no views. Infact the test report is:
      Couchbase.Tests.CouchbaseAuthenticatedViewTests.When_Bucket_Is_Authenticated_View_Returns_Results:
      System.Net.WebException : The remote server returned an error: (404) Not Found.

      2. DefaultConfigurationSettingsTests\When_Http_Timeout_Is_Not_Set_And_Using_App_Config_Default_Is_20_Seconds
      and
      DefaultConfigurationSettingsTests\When_Http_Timeout_Is_Not_Set_And_Using_Code_Config_Default_Is_20_Seconds:

      Test fails with the error:
      Expected: 00:00:20
      But was: 00:01:00
      Error reason:
      In method Couchbase\Configuration\ServersElement.cs -> HttpRequestTimeout(), the following attribute is set:
      [ConfigurationProperty("httpRequestTimeout", IsRequired = false, DefaultValue = "00:01:00"), PositiveTimeSpanValidator]
      DefaultValue set is 00:01:00, in test we compare the result with 00:00:20, hence the failure.
      The DefaultValue in attribute needs to be changed.

      3. CouchbaseClusterBucketAdminTests\When_Getting_Cluster_Item_Count_Count_Matches_Interesting_Stats and When_Getting_Bucket_Item_Count_Count_Matches_Basic_Stats:
      Error: System.Net.WebException : The remote server returned an error: (404) Not Found.
      ErrorSource: This test would run find if we provide the username and password for the cluster. The Http response object returns an error because it is not able to connect to the clusterm possibly error in ConfigurationManager.GetSection(configSectionName) which does not return "couchbase" config section

      4. CouchbaseClusterBucketAdminTests\When_Creating_New_Bucket_With_Ram_Quota_Less_Than_100_Argument_Exception_Is_Thrown:
      The exception message text was incorrect
      Expected message containing: Quota.RAM
      but was: RamQuotaMB must be at least 100
      Solution is to change the expected message in test attribute

      5. CouchbaseClientObserveTests\When_Storing_A_New_Key_With_Master_Persistence_That_Key_Is_In_View_When_Stale_Is_False:

      6. CouchbaseClientObserveTests\When_Storing_A_New_Key_Observe_Will_Fail_When_Cluster_Has_Too_Few_Nodes_For_Replication:
      This would run fine if we run on cluster with only one server node.

      7. When_Persisting_Json_Id_Is_Not_Serializd_But_Is_Returned_In_View

      8. When_Setting_Design_Document_Name_Transformer_To_Dev_Views_Are_Prefixed_With_Dev

      9. When_Setting_Design_Document_Name_Transformer_To_Prod_Views_Are_Not_Prefixed

      Show
      saakshi.manocha Saakshi Manocha added a comment - - edited I ran the .net unit tests against the latest code of couchbase-net-client and cluster version 2.0.0-1976 My cluster config comprise of the following nodes: 10.3.121.134 10.3.121.135 10.3.121.136 10.3.3.206 Some of the tests are failing, mostly are related to views. Please find the observations and their possible causes: 1. CouchbaseAuthenticatedViewTests\When_Bucket_Is_Authenticated_View_Returns_Results : First the test was failing because there was no document getting created in "authenticated" bucket. Supposedly the code was creating the default client object in method CouchbaseClientFactory.CreateCouchbaseClient(), where the bucket name is default. So I changed it the initialization statement to : _client = new CouchbaseClient("authenticated","secret"); Again running the test, now the documents are getting created for "authenticated" bucket but no views. Infact the test report is: Couchbase.Tests.CouchbaseAuthenticatedViewTests.When_Bucket_Is_Authenticated_View_Returns_Results: System.Net.WebException : The remote server returned an error: (404) Not Found. 2. DefaultConfigurationSettingsTests\When_Http_Timeout_Is_Not_Set_And_Using_App_Config_Default_Is_20_Seconds and DefaultConfigurationSettingsTests\When_Http_Timeout_Is_Not_Set_And_Using_Code_Config_Default_Is_20_Seconds: Test fails with the error: Expected: 00:00:20 But was: 00:01:00 Error reason: In method Couchbase\Configuration\ServersElement.cs -> HttpRequestTimeout(), the following attribute is set: [ConfigurationProperty("httpRequestTimeout", IsRequired = false, DefaultValue = "00:01:00"), PositiveTimeSpanValidator] DefaultValue set is 00:01:00, in test we compare the result with 00:00:20, hence the failure. The DefaultValue in attribute needs to be changed. 3. CouchbaseClusterBucketAdminTests\When_Getting_Cluster_Item_Count_Count_Matches_Interesting_Stats and When_Getting_Bucket_Item_Count_Count_Matches_Basic_Stats: Error: System.Net.WebException : The remote server returned an error: (404) Not Found. ErrorSource: This test would run find if we provide the username and password for the cluster. The Http response object returns an error because it is not able to connect to the clusterm possibly error in ConfigurationManager.GetSection(configSectionName) which does not return "couchbase" config section 4. CouchbaseClusterBucketAdminTests\When_Creating_New_Bucket_With_Ram_Quota_Less_Than_100_Argument_Exception_Is_Thrown: The exception message text was incorrect Expected message containing: Quota.RAM but was: RamQuotaMB must be at least 100 Solution is to change the expected message in test attribute 5. CouchbaseClientObserveTests\When_Storing_A_New_Key_With_Master_Persistence_That_Key_Is_In_View_When_Stale_Is_False: 6. CouchbaseClientObserveTests\When_Storing_A_New_Key_Observe_Will_Fail_When_Cluster_Has_Too_Few_Nodes_For_Replication: This would run fine if we run on cluster with only one server node. 7. When_Persisting_Json_Id_Is_Not_Serializd_But_Is_Returned_In_View 8. When_Setting_Design_Document_Name_Transformer_To_Dev_Views_Are_Prefixed_With_Dev 9. When_Setting_Design_Document_Name_Transformer_To_Prod_Views_Are_Not_Prefixed
      Hide
      saakshi.manocha Saakshi Manocha added a comment - - edited

      Also, many a times 'Operation time out' errors occur while running the test. I'm running test over VPN, is there any performance issue?
      This happens generally with GenericView and SpatialView tests.
      Although these tests run fine if debugged separately

      Show
      saakshi.manocha Saakshi Manocha added a comment - - edited Also, many a times 'Operation time out' errors occur while running the test. I'm running test over VPN, is there any performance issue? This happens generally with GenericView and SpatialView tests. Although these tests run fine if debugged separately
      Hide
      saakshi.manocha Saakshi Manocha added a comment -

      Following test failures have been fixed: (http://review.couchbase.org/#/c/24394/)
      Refer SDKQE-182 to track status.

      1. DefaultConfigurationSettingsTests\When_Http_Timeout_Is_Not_Set_And_Using_App_Config_Default_Is_20_Seconds
      and
      2. DefaultConfigurationSettingsTests\When_Http_Timeout_Is_Not_Set_And_Using_Code_Config_Default_Is_20_Seconds:
      Test fails with the error:
      Expected: 00:00:20
      But was: 00:01:00
      Fix provided: Recommended http time out is 1 minute so change the test and verify that the test is now passing after this change.
      Change request uploaded in Gerrit and pending for code review.

      3. CouchbaseClusterBucketAdminTests\When_Creating_New_Bucket_With_Ram_Quota_Less_Than_100_Argument_Exception_Is_Thrown:
      The exception message text was incorrect
      Expected message containing: Quota.RAM
      but was: RamQuotaMB must be at least 100
      Fix provided : change the expected message in test attribute and verify that the test is now passing after this change.
      Change request uploaded in Gerrit and pending for code review.

      4. DocHelperTests:
      Failure: Expected: String containing ""_id":"8675309""
      But was: "

      {"id":"8675309", "message" : "Test" }

      "\
      Fix provided is: remove the unnecessary underscore from id and test will pass. Change request uploaded in Gerrit and pending for code review.

      Show
      saakshi.manocha Saakshi Manocha added a comment - Following test failures have been fixed: ( http://review.couchbase.org/#/c/24394/ ) Refer SDKQE-182 to track status. 1. DefaultConfigurationSettingsTests\When_Http_Timeout_Is_Not_Set_And_Using_App_Config_Default_Is_20_Seconds and 2. DefaultConfigurationSettingsTests\When_Http_Timeout_Is_Not_Set_And_Using_Code_Config_Default_Is_20_Seconds: Test fails with the error: Expected: 00:00:20 But was: 00:01:00 Fix provided: Recommended http time out is 1 minute so change the test and verify that the test is now passing after this change. Change request uploaded in Gerrit and pending for code review. 3. CouchbaseClusterBucketAdminTests\When_Creating_New_Bucket_With_Ram_Quota_Less_Than_100_Argument_Exception_Is_Thrown: The exception message text was incorrect Expected message containing: Quota.RAM but was: RamQuotaMB must be at least 100 Fix provided : change the expected message in test attribute and verify that the test is now passing after this change. Change request uploaded in Gerrit and pending for code review. 4. DocHelperTests: Failure: Expected: String containing ""_id":"8675309"" But was: " {"id":"8675309", "message" : "Test" } "\ Fix provided is: remove the unnecessary underscore from id and test will pass. Change request uploaded in Gerrit and pending for code review.
      Hide
      saakshi.manocha Saakshi Manocha added a comment -

      Few more issues corrected:
      (a) http://review.couchbase.org/#/c/24977/
      NCBC-234: Return CAS value with ExecuteGetJson

      (b) http://review.couchbase.org/#/c/24978/
      NCBC-236: Fix view param JSON serialization tests

      Show
      saakshi.manocha Saakshi Manocha added a comment - Few more issues corrected: (a) http://review.couchbase.org/#/c/24977/ NCBC-234 : Return CAS value with ExecuteGetJson (b) http://review.couchbase.org/#/c/24978/ NCBC-236 : Fix view param JSON serialization tests
      saakshi.manocha Saakshi Manocha made changes -
      Link This issue blocks SDKQE-192 [ SDKQE-192 ]
      Hide
      saakshi.manocha Saakshi Manocha added a comment -

      More tests added :
      http://review.couchbase.org/#/c/24980/

      1. CouchbaseAuthenticatedViewTests ->
      (a) Added new test :
      When_Bucket_Is_Authenticated_And_Bad_Credentials_Are_Provided_Exception_Is_Thrown

      2. CouchbaseClientGetTests ->
      (a) Added new tests:
      When_Getting_Multiple_Non_Existent_Keys_Result_Is_Not_Successful
      and When_Getting_A_Zero_Length_Key_No_Exception_Is_Thrown_And_Success_Is_False
      (b) Renamed
      When_Getting_Multiple_Keys_Result_Is_Successful -> When_Getting_Multiple_Existent_Keys_Result_Is_Successful

      3. CouchbaseClientObserveTests ->
      (a) Added new tests:
      When_Storing_A_New_Key_Observe_Will_Succeed_With_Zero_Persistence_And_Zero_Replication
      and
      When_Storing_A_New_Key_Observe_Will_Pass_With_Replication_More_Than_Available_Nodes
      and
      When_Storing_A_New_Key_Observe_Will_Fail_With_Persistence_More_Than_Available_Nodes

      4. CouchbaseClientCasTests ->
      (a) Added new tests:
      When_Replacing_Item_With_Valid_Cas_Result_Is_Successful

      Show
      saakshi.manocha Saakshi Manocha added a comment - More tests added : http://review.couchbase.org/#/c/24980/ 1. CouchbaseAuthenticatedViewTests -> (a) Added new test : When_Bucket_Is_Authenticated_And_Bad_Credentials_Are_Provided_Exception_Is_Thrown 2. CouchbaseClientGetTests -> (a) Added new tests: When_Getting_Multiple_Non_Existent_Keys_Result_Is_Not_Successful and When_Getting_A_Zero_Length_Key_No_Exception_Is_Thrown_And_Success_Is_False (b) Renamed When_Getting_Multiple_Keys_Result_Is_Successful -> When_Getting_Multiple_Existent_Keys_Result_Is_Successful 3. CouchbaseClientObserveTests -> (a) Added new tests: When_Storing_A_New_Key_Observe_Will_Succeed_With_Zero_Persistence_And_Zero_Replication and When_Storing_A_New_Key_Observe_Will_Pass_With_Replication_More_Than_Available_Nodes and When_Storing_A_New_Key_Observe_Will_Fail_With_Persistence_More_Than_Available_Nodes 4. CouchbaseClientCasTests -> (a) Added new tests: When_Replacing_Item_With_Valid_Cas_Result_Is_Successful
      john John Zablocki (Inactive) made changes -
      Fix Version/s 1.2.3 [ 10473 ]
      Fix Version/s 1.2.2 [ 10472 ]
      john John Zablocki (Inactive) made changes -
      Planned Start (set to new fixed version's start date)
      Planned End (set to new fixed version's start date)
      john John Zablocki (Inactive) made changes -
      Fix Version/s 1.2.5 [ 10525 ]
      Fix Version/s 1.2.4 [ 10473 ]
      john John Zablocki (Inactive) made changes -
      Fix Version/s 1.2.7 [ 10615 ]
      Fix Version/s 1.2.5 [ 10525 ]
      john John Zablocki (Inactive) made changes -
      Fix Version/s 1.2.8 [ 10616 ]
      Fix Version/s 1.2.7 [ 10615 ]
      ingenthr Matt Ingenthron made changes -
      Assignee John Zablocki [ john ] Matt Ingenthron [ ingenthr ]
      Hide
      saakshi.manocha Saakshi Manocha added a comment -

      Solved problem with CouchbaseClientViewNameTransformerTests (8 and 9 points mentioned in description).
      Refer here: http://review.couchbase.org/#/c/27312/1
      It was using the wrong bucket name.
      Changes tracjed in SDKQE-333

      Show
      saakshi.manocha Saakshi Manocha added a comment - Solved problem with CouchbaseClientViewNameTransformerTests (8 and 9 points mentioned in description). Refer here: http://review.couchbase.org/#/c/27312/1 It was using the wrong bucket name. Changes tracjed in SDKQE-333
      jmorris Jeff Morris made changes -
      Fix Version/s 1.3 [ 10396 ]
      Fix Version/s 1.2.8 [ 10616 ]
      ingenthr Matt Ingenthron made changes -
      Assignee Matt Ingenthron [ ingenthr ] Jeff Morris [ jmorris ]
      jmorris Jeff Morris made changes -
      Component/s library [ 10122 ]
      jmorris Jeff Morris made changes -
      Assignee Jeff Morris [ jmorris ] Saakshi Manocha [ saakshi.manocha ]
      Hide
      saakshi.manocha Saakshi Manocha added a comment -

      closing this ticket and we can work on individual tickets to address invalid tests

      Show
      saakshi.manocha Saakshi Manocha added a comment - closing this ticket and we can work on individual tickets to address invalid tests
      saakshi.manocha Saakshi Manocha made changes -
      Status Open [ 1 ] Resolved [ 5 ]
      Resolution Fixed [ 1 ]
      brett19 Brett Lawson made changes -
      Workflow jira [ 22205 ] Couchbase SDK Workflow [ 43072 ]

        People

        • Assignee:
          saakshi.manocha Saakshi Manocha
          Reporter:
          john John Zablocki (Inactive)
        • Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Gerrit Reviews

            There are no open Gerrit changes