<commit_before>Feature: Unsubscribing to Resources
  After subscribing to a set of resources, a client can unbuscribe from any
  or all of these resources. The client should no longer receive updates from
  resources they've unsubcribed to.

  These features come from this list of test cases:
  https://docs.google.com/document/d/19oUEt9jSSgwNnvZjZgaFYBHZZsw52f2MwSo6LWKzg-E

  @CDS @LDS @sotw @non-aggregated @aggregated
  Scenario: [<service>] Client can unsubcribe from some resources
    # This test does not check if the final results are only the subscribed resources
    # it is valid(though not desired) for a server to send more than is requested.
    # So the test will pass if client subscribes to A,B,C, unsubscribes from B,C and gets A,B,C back.
    Given a target setup with service <service>, resources <resources>, and starting version <starting version>
    When the Client subscribes to a subset of resources,<subset of resources>, for <service>
    Then the Client receives the resources <subset of resources> and version <starting version> for <service>
    When the Client updates subscription to a resource(<resource from subset>) of <service> with version <starting version>
    And  the resources <resource from subset> of the <service> is updated to version <next version>
    Then the Client receives the resources <resource from subset> and version <next version> for <service>
    And the Client sends an ACK to which the <service> does not respond

    Examples:
      | service | starting version | resources   | subset of resources | resource from subset |   next version  |
      | "CDS"   | "1"              | "F,A,B,C,D" | "C,A,B"             | "A,C"                |   "2"           |
      | "LDS"   | "1"              | "G,B,L,D"   | "B,D"               | "B"                  |   "2"           |


  @sotw @non-aggregated @aggregated @active
  Scenario: [<service>] Client can unsubcribe from some resources
    # difference from test above is use of the word ONLY in the final THEN step
    # This currently does not pass for go-control-plane
    Given a target setup with service <service>, resources <resources>, and starting version <starting version>
    When the Client subscribes to a subset of resources,<subset of resources>, for <service>
    Then the Client receives the resources <subset of resources> and version <starting version> for <service>
    When the Client updates subscription to a resource(<resource from subset>) of <service> with version <starting version>
    And  the resources <resource from subset> of the <service> is updated to version <next version>
    Then the Client receives only the resource <resource from subset> and version <next version> for the service <service>
    And the Client sends an ACK to which the <service> does not respond

    Examples:
      | service | starting version | resources   | subset of resources | resource from subset |   next version  |
      | "RDS"   | "1"              | "G,B,L,D"   | "B,D"               | "B"                  |   "2"           |
      | "EDS"   | "1"              | "G,B,L,D"   | "B,D"               | "B"                  |   "2"           |


  @sotw @non-aggregated @aggregated
  Scenario: [<service>] Client can unsubscribe from all resources
    # This is not working currently, the unsusbcribe is not registered,
    # neither as an unsubscribe nor a new wildcard request
    Given a target setup with service <service>, resources <resources>, and starting version <starting version>
    When the Client subscribes to a subset of resources,<subset of resources>, for <service>
    Then the Client receives the resources <subset of resources> and version <starting version> for <service>
    When the Client unsubscribes from all resources for <service>
    And the resources <subset of resources> of the <service> is updated to version <next version>
    Then the Client does not receive any message from <service>

    Examples:
      | service | starting version | resources   | subset of resources | next version |
      | "CDS"   | "1"              | "A,B,C,D"   | "A,B"               | "2"          |
      | "LDS"   | "1"              | "A,B,C,D"   | "A,B"               | "2"          |
      | "RDS"   | "1"              | "A,B,C,D"   | "A,B"               | "2"          |
      | "EDS"   | "1"              | "A,B,C,D"   | "A,B"               | "2"          |


    @sotw @aggregated
    Scenario: [<service>] Client can subscribe to multiple services via ADS
      Given a target setup with service <service>, resources <resources>, and starting version <starting version>
      When the Client subscribes to a subset of resources,<subset of resources>, for <service>
      Then the Client receives the resources <subset of resources> and version <starting version> for <service>
      When the Client subscribes to a subset of resources, <subset of resources>, for <other service>
      Then the Client receives the resources <subset of resources> and version <starting version> for <other service>
      When the resources <subset of resources> of the <service> is updated to version <next version>
      Then the Client receives the resources <subset of resources> and version <next version> for <service>
      # trying out different language for server not responding to acks
      And the service never responds more than necessary

      Examples:
        | service | other service | starting version | resources | subset of resources | next version |
        | "CDS"   | "LDS"         | "1"              | "A,B,C"   | "B"                 | "2"          |
        | "RDS"   | "EDS"         | "1"              | "A,B,C"   | "B"                 | "2"          |<commit_msg>improve wording throughout unsub tests<commit_after>Feature: Unsubscribing to Resources
  After subscribing to a set of resources, a client can unbuscribe from any
  or all of these resources. The client should no longer receive updates from
  resources they've unsubcribed to.

  These features come from this list of test cases:
  https://docs.google.com/document/d/19oUEt9jSSgwNnvZjZgaFYBHZZsw52f2MwSo6LWKzg-E

  @sotw @non-aggregated @aggregated
  Scenario: [<xDS>] Client can unsubcribe from some resources
    # This test does not check if the final results are only the subscribed resources
    # it is valid(though not desired) for a server to send more than is requested.
    # So the test will pass if client subscribes to A,B,C, unsubscribes from B,C and gets A,B,C back.
    Given a target setup with service <xDS>, resources <resources>, and starting version <v1>
    When the Client subscribes to a subset of resources,<subset>, for <xDS>
    Then the Client receives the resources <subset> and version <v1> for <xDS>
    When the Client updates subscription to a resource(<r1>) of <xDS> with version <v1>
    And  the resources <r1> of the <xDS> is updated to version <v2>
    Then the Client receives the resources <r1> and version <v2> for <xDS>
    And the resources <r1> and version <v2> for <xDS> came in a single response
    And the service never responds more than necessary

    Examples:
      | xDS   | resources   | subset  | r1    | v1  | v2  |
      | "CDS" | "F,A,B,C,D" | "C,A,B" | "A,C" | "1" | "2" |
      | "LDS" | "G,B,L,D"   | "B,D,L" | "B,D" | "1" | "2" |


  @sotw @non-aggregated @aggregated
  Scenario: [<xDS>] Client can unsubcribe from some resources
    # difference from test above is use of the word ONLY in the final THEN step
    Given a target setup with service <xDS>, resources <resources>, and starting version <v1>
    When the Client subscribes to a subset of resources,<subset>, for <xDS>
    Then the Client receives the resources <subset> and version <v1> for <xDS>
    When the Client updates subscription to a resource(<r1>) of <xDS> with version <v1>
    And the resources <r1> of the <xDS> is updated to version <v2>
    Then the Client receives only the resource <r1> and version <v2> for the service <xDS>
    And the Client sends an ACK to which the <xDS> does not respond

    Examples:
      | xDS   | resources | subset | r1  | v1  | v2  |
      | "RDS" | "A,B,C,D" | "B,D"  | "B" | "1" | "2" |
      | "EDS" | "A,B,C,D" | "B,D"  | "B" | "1" | "2" |


  @sotw @non-aggregated @aggregated
  Scenario: [<xDS>] Client can unsubscribe from all resources
    Given a target setup with service <xDS>, resources <resources>, and starting version <v1>
    When the Client subscribes to a subset of resources,<subset>, for <xDS>
    Then the Client receives the resources <subset> and version <v1> for <xDS>
    When the Client unsubscribes from all resources for <xDS>
    And the resources <subset> of the <xDS> is updated to version <v2>
    Then the Client does not receive any message from <xDS>

    Examples:
      | xDS   | resources | subset | v1  | v2  |
      | "CDS" | "A,B,C,D" | "A,B"  | "1" | "2" |
      | "RDS" | "A,B,C,D" | "A,B"  | "1" | "2" |
      | "LDS" | "A,B,C,D" | "A,B"  | "1" | "2" |
      | "EDS" | "A,B,C,D" | "A,B"  | "1" | "2" |
{'fraction_non_alphanumeric': 0.09510118323565188, 'fraction_numerical': 0.008736038925135465, 'mean_word_length': 2.7604989604989605, 'pattern_counts': {'":': 0, '<': 129, '<?xml version=': 0, '>': 129, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1980075', 'n_tokens_mistral': 2746, 'n_tokens_neox': 2632, 'n_words': 1140}