diff --git a/README.md b/README.md
index 6761e9fc741..cbc100bd306 100644
--- a/README.md
+++ b/README.md
@@ -44,8 +44,8 @@ For a guided tour, take a look at the [quick start
guide](https://grpc.io/docs/languages/java/quickstart) or the more explanatory [gRPC
basics](https://grpc.io/docs/languages/java/basics).
-The [examples](https://github.com/grpc/grpc-java/tree/v1.52.0/examples) and the
-[Android example](https://github.com/grpc/grpc-java/tree/v1.52.0/examples/android)
+The [examples](https://github.com/grpc/grpc-java/tree/v1.52.1/examples) and the
+[Android example](https://github.com/grpc/grpc-java/tree/v1.52.1/examples/android)
are standalone projects that showcase the usage of gRPC.
Download
@@ -56,18 +56,18 @@ Download [the JARs][]. Or for Maven with non-Android, add to your `pom.xml`:
io.grpc
grpc-netty-shaded
- 1.52.0
+ 1.52.1
runtime
io.grpc
grpc-protobuf
- 1.52.0
+ 1.52.1
io.grpc
grpc-stub
- 1.52.0
+ 1.52.1
org.apache.tomcat
@@ -79,23 +79,23 @@ Download [the JARs][]. Or for Maven with non-Android, add to your `pom.xml`:
Or for Gradle with non-Android, add to your dependencies:
```gradle
-runtimeOnly 'io.grpc:grpc-netty-shaded:1.52.0'
-implementation 'io.grpc:grpc-protobuf:1.52.0'
-implementation 'io.grpc:grpc-stub:1.52.0'
+runtimeOnly 'io.grpc:grpc-netty-shaded:1.52.1'
+implementation 'io.grpc:grpc-protobuf:1.52.1'
+implementation 'io.grpc:grpc-stub:1.52.1'
compileOnly 'org.apache.tomcat:annotations-api:6.0.53' // necessary for Java 9+
```
For Android client, use `grpc-okhttp` instead of `grpc-netty-shaded` and
`grpc-protobuf-lite` instead of `grpc-protobuf`:
```gradle
-implementation 'io.grpc:grpc-okhttp:1.52.0'
-implementation 'io.grpc:grpc-protobuf-lite:1.52.0'
-implementation 'io.grpc:grpc-stub:1.52.0'
+implementation 'io.grpc:grpc-okhttp:1.52.1'
+implementation 'io.grpc:grpc-protobuf-lite:1.52.1'
+implementation 'io.grpc:grpc-stub:1.52.1'
compileOnly 'org.apache.tomcat:annotations-api:6.0.53' // necessary for Java 9+
```
[the JARs]:
-https://search.maven.org/search?q=g:io.grpc%20AND%20v:1.52.0
+https://search.maven.org/search?q=g:io.grpc%20AND%20v:1.52.1
Development snapshots are available in [Sonatypes's snapshot
repository](https://oss.sonatype.org/content/repositories/snapshots/).
@@ -127,7 +127,7 @@ For protobuf-based codegen integrated with the Maven build system, you can use
com.google.protobuf:protoc:3.21.7:exe:${os.detected.classifier}
grpc-java
- io.grpc:protoc-gen-grpc-java:1.52.0:exe:${os.detected.classifier}
+ io.grpc:protoc-gen-grpc-java:1.52.1:exe:${os.detected.classifier}
@@ -157,7 +157,7 @@ protobuf {
}
plugins {
grpc {
- artifact = 'io.grpc:protoc-gen-grpc-java:1.52.0'
+ artifact = 'io.grpc:protoc-gen-grpc-java:1.52.1'
}
}
generateProtoTasks {
@@ -190,7 +190,7 @@ protobuf {
}
plugins {
grpc {
- artifact = 'io.grpc:protoc-gen-grpc-java:1.52.0'
+ artifact = 'io.grpc:protoc-gen-grpc-java:1.52.1'
}
}
generateProtoTasks {
diff --git a/build.gradle b/build.gradle
index 04ab724a2e3..8340c2488c3 100644
--- a/build.gradle
+++ b/build.gradle
@@ -20,7 +20,7 @@ subprojects {
apply plugin: "net.ltgt.errorprone"
group = "io.grpc"
- version = "1.52.0" // CURRENT_GRPC_VERSION
+ version = "1.52.1" // CURRENT_GRPC_VERSION
repositories {
maven { // The google mirror is less flaky than mavenCentral()
diff --git a/compiler/src/test/golden/TestDeprecatedService.java.txt b/compiler/src/test/golden/TestDeprecatedService.java.txt
index 8b541b7c3f0..941668a4a08 100644
--- a/compiler/src/test/golden/TestDeprecatedService.java.txt
+++ b/compiler/src/test/golden/TestDeprecatedService.java.txt
@@ -8,7 +8,7 @@ import static io.grpc.MethodDescriptor.generateFullMethodName;
*
*/
@javax.annotation.Generated(
- value = "by gRPC proto compiler (version 1.52.0)",
+ value = "by gRPC proto compiler (version 1.52.1)",
comments = "Source: grpc/testing/compiler/test.proto")
@io.grpc.stub.annotations.GrpcGenerated
@java.lang.Deprecated
diff --git a/compiler/src/test/golden/TestService.java.txt b/compiler/src/test/golden/TestService.java.txt
index 9ef5e4a0327..86962b23e90 100644
--- a/compiler/src/test/golden/TestService.java.txt
+++ b/compiler/src/test/golden/TestService.java.txt
@@ -8,7 +8,7 @@ import static io.grpc.MethodDescriptor.generateFullMethodName;
*
*/
@javax.annotation.Generated(
- value = "by gRPC proto compiler (version 1.52.0)",
+ value = "by gRPC proto compiler (version 1.52.1)",
comments = "Source: grpc/testing/compiler/test.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class TestServiceGrpc {
diff --git a/compiler/src/testLite/golden/TestDeprecatedService.java.txt b/compiler/src/testLite/golden/TestDeprecatedService.java.txt
index 2a9f951e913..5ed3be65a09 100644
--- a/compiler/src/testLite/golden/TestDeprecatedService.java.txt
+++ b/compiler/src/testLite/golden/TestDeprecatedService.java.txt
@@ -8,7 +8,7 @@ import static io.grpc.MethodDescriptor.generateFullMethodName;
*
*/
@javax.annotation.Generated(
- value = "by gRPC proto compiler (version 1.52.0)",
+ value = "by gRPC proto compiler (version 1.52.1)",
comments = "Source: grpc/testing/compiler/test.proto")
@io.grpc.stub.annotations.GrpcGenerated
@java.lang.Deprecated
diff --git a/compiler/src/testLite/golden/TestService.java.txt b/compiler/src/testLite/golden/TestService.java.txt
index d5495156c4d..6d2e391ffda 100644
--- a/compiler/src/testLite/golden/TestService.java.txt
+++ b/compiler/src/testLite/golden/TestService.java.txt
@@ -8,7 +8,7 @@ import static io.grpc.MethodDescriptor.generateFullMethodName;
*
*/
@javax.annotation.Generated(
- value = "by gRPC proto compiler (version 1.52.0)",
+ value = "by gRPC proto compiler (version 1.52.1)",
comments = "Source: grpc/testing/compiler/test.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class TestServiceGrpc {
diff --git a/core/src/main/java/io/grpc/internal/GrpcUtil.java b/core/src/main/java/io/grpc/internal/GrpcUtil.java
index 3d3677eb134..f57d9c12b26 100644
--- a/core/src/main/java/io/grpc/internal/GrpcUtil.java
+++ b/core/src/main/java/io/grpc/internal/GrpcUtil.java
@@ -217,7 +217,7 @@ public byte[] parseAsciiString(byte[] serialized) {
public static final Splitter ACCEPT_ENCODING_SPLITTER = Splitter.on(',').trimResults();
- private static final String IMPLEMENTATION_VERSION = "1.52.0"; // CURRENT_GRPC_VERSION
+ private static final String IMPLEMENTATION_VERSION = "1.52.1"; // CURRENT_GRPC_VERSION
/**
* The default timeout in nanos for a keepalive ping request.
diff --git a/cronet/README.md b/cronet/README.md
index 1b4be783faf..a89e49fb83d 100644
--- a/cronet/README.md
+++ b/cronet/README.md
@@ -26,7 +26,7 @@ In your app module's `build.gradle` file, include a dependency on both `grpc-cro
Google Play Services Client Library for Cronet
```
-implementation 'io.grpc:grpc-cronet:1.52.0'
+implementation 'io.grpc:grpc-cronet:1.52.1'
implementation 'com.google.android.gms:play-services-cronet:16.0.0'
```
diff --git a/documentation/android-channel-builder.md b/documentation/android-channel-builder.md
index 24c1e3890d8..589e8c458f6 100644
--- a/documentation/android-channel-builder.md
+++ b/documentation/android-channel-builder.md
@@ -36,8 +36,8 @@ In your `build.gradle` file, include a dependency on both `grpc-android` and
`grpc-okhttp`:
```
-implementation 'io.grpc:grpc-android:1.52.0'
-implementation 'io.grpc:grpc-okhttp:1.52.0'
+implementation 'io.grpc:grpc-android:1.52.1'
+implementation 'io.grpc:grpc-okhttp:1.52.1'
```
You also need permission to access the device's network state in your
diff --git a/examples/android/clientcache/app/build.gradle b/examples/android/clientcache/app/build.gradle
index 502b34a8310..6baf3054f72 100644
--- a/examples/android/clientcache/app/build.gradle
+++ b/examples/android/clientcache/app/build.gradle
@@ -34,7 +34,7 @@ android {
protobuf {
protoc { artifact = 'com.google.protobuf:protoc:3.21.7' }
plugins {
- grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.52.0' // CURRENT_GRPC_VERSION
+ grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.52.1' // CURRENT_GRPC_VERSION
}
}
generateProtoTasks {
@@ -54,12 +54,12 @@ dependencies {
implementation 'com.android.support:appcompat-v7:27.0.2'
// You need to build grpc-java to obtain these libraries below.
- implementation 'io.grpc:grpc-okhttp:1.52.0' // CURRENT_GRPC_VERSION
- implementation 'io.grpc:grpc-protobuf-lite:1.52.0' // CURRENT_GRPC_VERSION
- implementation 'io.grpc:grpc-stub:1.52.0' // CURRENT_GRPC_VERSION
+ implementation 'io.grpc:grpc-okhttp:1.52.1' // CURRENT_GRPC_VERSION
+ implementation 'io.grpc:grpc-protobuf-lite:1.52.1' // CURRENT_GRPC_VERSION
+ implementation 'io.grpc:grpc-stub:1.52.1' // CURRENT_GRPC_VERSION
implementation 'org.apache.tomcat:annotations-api:6.0.53'
testImplementation 'junit:junit:4.12'
testImplementation 'com.google.truth:truth:1.0.1'
- testImplementation 'io.grpc:grpc-testing:1.52.0' // CURRENT_GRPC_VERSION
+ testImplementation 'io.grpc:grpc-testing:1.52.1' // CURRENT_GRPC_VERSION
}
diff --git a/examples/android/helloworld/app/build.gradle b/examples/android/helloworld/app/build.gradle
index 93adc585e6b..319dff60c9c 100644
--- a/examples/android/helloworld/app/build.gradle
+++ b/examples/android/helloworld/app/build.gradle
@@ -32,7 +32,7 @@ android {
protobuf {
protoc { artifact = 'com.google.protobuf:protoc:3.21.7' }
plugins {
- grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.52.0' // CURRENT_GRPC_VERSION
+ grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.52.1' // CURRENT_GRPC_VERSION
}
}
generateProtoTasks {
@@ -52,8 +52,8 @@ dependencies {
implementation 'com.android.support:appcompat-v7:27.0.2'
// You need to build grpc-java to obtain these libraries below.
- implementation 'io.grpc:grpc-okhttp:1.52.0' // CURRENT_GRPC_VERSION
- implementation 'io.grpc:grpc-protobuf-lite:1.52.0' // CURRENT_GRPC_VERSION
- implementation 'io.grpc:grpc-stub:1.52.0' // CURRENT_GRPC_VERSION
+ implementation 'io.grpc:grpc-okhttp:1.52.1' // CURRENT_GRPC_VERSION
+ implementation 'io.grpc:grpc-protobuf-lite:1.52.1' // CURRENT_GRPC_VERSION
+ implementation 'io.grpc:grpc-stub:1.52.1' // CURRENT_GRPC_VERSION
implementation 'org.apache.tomcat:annotations-api:6.0.53'
}
diff --git a/examples/android/routeguide/app/build.gradle b/examples/android/routeguide/app/build.gradle
index 91c8ad658c7..cc3548fb1cb 100644
--- a/examples/android/routeguide/app/build.gradle
+++ b/examples/android/routeguide/app/build.gradle
@@ -32,7 +32,7 @@ android {
protobuf {
protoc { artifact = 'com.google.protobuf:protoc:3.21.7' }
plugins {
- grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.52.0' // CURRENT_GRPC_VERSION
+ grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.52.1' // CURRENT_GRPC_VERSION
}
}
generateProtoTasks {
@@ -52,8 +52,8 @@ dependencies {
implementation 'com.android.support:appcompat-v7:27.0.2'
// You need to build grpc-java to obtain these libraries below.
- implementation 'io.grpc:grpc-okhttp:1.52.0' // CURRENT_GRPC_VERSION
- implementation 'io.grpc:grpc-protobuf-lite:1.52.0' // CURRENT_GRPC_VERSION
- implementation 'io.grpc:grpc-stub:1.52.0' // CURRENT_GRPC_VERSION
+ implementation 'io.grpc:grpc-okhttp:1.52.1' // CURRENT_GRPC_VERSION
+ implementation 'io.grpc:grpc-protobuf-lite:1.52.1' // CURRENT_GRPC_VERSION
+ implementation 'io.grpc:grpc-stub:1.52.1' // CURRENT_GRPC_VERSION
implementation 'org.apache.tomcat:annotations-api:6.0.53'
}
diff --git a/examples/android/strictmode/app/build.gradle b/examples/android/strictmode/app/build.gradle
index e77f7c8fdbe..50713e94b6b 100644
--- a/examples/android/strictmode/app/build.gradle
+++ b/examples/android/strictmode/app/build.gradle
@@ -33,7 +33,7 @@ android {
protobuf {
protoc { artifact = 'com.google.protobuf:protoc:3.21.7' }
plugins {
- grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.52.0' // CURRENT_GRPC_VERSION
+ grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.52.1' // CURRENT_GRPC_VERSION
}
}
generateProtoTasks {
@@ -53,8 +53,8 @@ dependencies {
implementation 'com.android.support:appcompat-v7:28.0.0'
// You need to build grpc-java to obtain these libraries below.
- implementation 'io.grpc:grpc-okhttp:1.52.0' // CURRENT_GRPC_VERSION
- implementation 'io.grpc:grpc-protobuf-lite:1.52.0' // CURRENT_GRPC_VERSION
- implementation 'io.grpc:grpc-stub:1.52.0' // CURRENT_GRPC_VERSION
+ implementation 'io.grpc:grpc-okhttp:1.52.1' // CURRENT_GRPC_VERSION
+ implementation 'io.grpc:grpc-protobuf-lite:1.52.1' // CURRENT_GRPC_VERSION
+ implementation 'io.grpc:grpc-stub:1.52.1' // CURRENT_GRPC_VERSION
implementation 'org.apache.tomcat:annotations-api:6.0.53'
}
diff --git a/examples/build.gradle b/examples/build.gradle
index 4b80e67f607..a9f3aa6ceb4 100644
--- a/examples/build.gradle
+++ b/examples/build.gradle
@@ -22,7 +22,7 @@ targetCompatibility = 1.8
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
-def grpcVersion = '1.52.0' // CURRENT_GRPC_VERSION
+def grpcVersion = '1.52.1' // CURRENT_GRPC_VERSION
def protobufVersion = '3.21.7'
def protocVersion = protobufVersion
diff --git a/examples/example-alts/build.gradle b/examples/example-alts/build.gradle
index 0fc499d3d99..6dbf155bfd3 100644
--- a/examples/example-alts/build.gradle
+++ b/examples/example-alts/build.gradle
@@ -23,7 +23,7 @@ targetCompatibility = 1.8
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
-def grpcVersion = '1.52.0' // CURRENT_GRPC_VERSION
+def grpcVersion = '1.52.1' // CURRENT_GRPC_VERSION
def protocVersion = '3.21.7'
dependencies {
diff --git a/examples/example-gauth/build.gradle b/examples/example-gauth/build.gradle
index 2da074f4f38..88a4707c028 100644
--- a/examples/example-gauth/build.gradle
+++ b/examples/example-gauth/build.gradle
@@ -23,7 +23,7 @@ targetCompatibility = 1.8
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
-def grpcVersion = '1.52.0' // CURRENT_GRPC_VERSION
+def grpcVersion = '1.52.1' // CURRENT_GRPC_VERSION
def protobufVersion = '3.21.7'
def protocVersion = protobufVersion
diff --git a/examples/example-gauth/pom.xml b/examples/example-gauth/pom.xml
index 2cd72aa6ef7..c1754caf678 100644
--- a/examples/example-gauth/pom.xml
+++ b/examples/example-gauth/pom.xml
@@ -6,13 +6,13 @@
jar
- 1.52.0
+ 1.52.1
example-gauth
https://github.com/grpc/grpc-java
UTF-8
- 1.52.0
+ 1.52.1
3.21.7
1.7
diff --git a/examples/example-hostname/build.gradle b/examples/example-hostname/build.gradle
index f02b30af04e..38bfe580748 100644
--- a/examples/example-hostname/build.gradle
+++ b/examples/example-hostname/build.gradle
@@ -21,7 +21,7 @@ targetCompatibility = 1.8
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
-def grpcVersion = '1.52.0' // CURRENT_GRPC_VERSION
+def grpcVersion = '1.52.1' // CURRENT_GRPC_VERSION
def protobufVersion = '3.21.7'
dependencies {
diff --git a/examples/example-hostname/pom.xml b/examples/example-hostname/pom.xml
index b6384fad254..9e04b246c41 100644
--- a/examples/example-hostname/pom.xml
+++ b/examples/example-hostname/pom.xml
@@ -6,13 +6,13 @@
jar
- 1.52.0
+ 1.52.1
example-hostname
https://github.com/grpc/grpc-java
UTF-8
- 1.52.0
+ 1.52.1
3.21.7
1.7
diff --git a/examples/example-jwt-auth/build.gradle b/examples/example-jwt-auth/build.gradle
index f2373fa4b65..bc28468d878 100644
--- a/examples/example-jwt-auth/build.gradle
+++ b/examples/example-jwt-auth/build.gradle
@@ -22,7 +22,7 @@ targetCompatibility = 1.8
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
-def grpcVersion = '1.52.0' // CURRENT_GRPC_VERSION
+def grpcVersion = '1.52.1' // CURRENT_GRPC_VERSION
def protobufVersion = '3.21.7'
def protocVersion = protobufVersion
diff --git a/examples/example-jwt-auth/pom.xml b/examples/example-jwt-auth/pom.xml
index 4b3abec4ec2..520bca15629 100644
--- a/examples/example-jwt-auth/pom.xml
+++ b/examples/example-jwt-auth/pom.xml
@@ -7,13 +7,13 @@
jar
- 1.52.0
+ 1.52.1
example-jwt-auth
https://github.com/grpc/grpc-java
UTF-8
- 1.52.0
+ 1.52.1
3.21.7
3.21.7
diff --git a/examples/example-orca/build.gradle b/examples/example-orca/build.gradle
index 8b247c4b37f..f182638b57c 100644
--- a/examples/example-orca/build.gradle
+++ b/examples/example-orca/build.gradle
@@ -17,7 +17,7 @@ repositories {
sourceCompatibility = 1.8
targetCompatibility = 1.8
-def grpcVersion = '1.52.0' // CURRENT_GRPC_VERSION
+def grpcVersion = '1.52.1' // CURRENT_GRPC_VERSION
def protocVersion = '3.21.7'
dependencies {
diff --git a/examples/example-tls/build.gradle b/examples/example-tls/build.gradle
index 76940b9a95d..feec007d041 100644
--- a/examples/example-tls/build.gradle
+++ b/examples/example-tls/build.gradle
@@ -23,7 +23,7 @@ targetCompatibility = 1.8
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
-def grpcVersion = '1.52.0' // CURRENT_GRPC_VERSION
+def grpcVersion = '1.52.1' // CURRENT_GRPC_VERSION
def protocVersion = '3.21.7'
dependencies {
diff --git a/examples/example-tls/pom.xml b/examples/example-tls/pom.xml
index de9d8b4ae3c..0736f224fa6 100644
--- a/examples/example-tls/pom.xml
+++ b/examples/example-tls/pom.xml
@@ -6,13 +6,13 @@
jar
- 1.52.0
+ 1.52.1
example-tls
https://github.com/grpc/grpc-java
UTF-8
- 1.52.0
+ 1.52.1
3.21.7
2.0.54.Final
diff --git a/examples/example-xds/build.gradle b/examples/example-xds/build.gradle
index 14c8dd1e89e..499144d2168 100644
--- a/examples/example-xds/build.gradle
+++ b/examples/example-xds/build.gradle
@@ -22,7 +22,7 @@ targetCompatibility = 1.8
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
-def grpcVersion = '1.52.0' // CURRENT_GRPC_VERSION
+def grpcVersion = '1.52.1' // CURRENT_GRPC_VERSION
def nettyTcNativeVersion = '2.0.31.Final'
def protocVersion = '3.21.7'
diff --git a/examples/pom.xml b/examples/pom.xml
index e90c527d7fa..251ef5ae3b4 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -6,13 +6,13 @@
jar
- 1.52.0
+ 1.52.1
examples
https://github.com/grpc/grpc-java
UTF-8
- 1.52.0
+ 1.52.1
3.21.7
3.21.7
diff --git a/xds/src/main/java/io/grpc/xds/XdsClientImpl.java b/xds/src/main/java/io/grpc/xds/XdsClientImpl.java
index 26392acc733..fe61ef95eb8 100644
--- a/xds/src/main/java/io/grpc/xds/XdsClientImpl.java
+++ b/xds/src/main/java/io/grpc/xds/XdsClientImpl.java
@@ -328,13 +328,13 @@ public void run() {
if (!subscriber.isWatched()) {
subscriber.cancelResourceWatch();
resourceSubscribers.get(type).remove(resourceName);
- subscribedResourceTypeUrls.remove(type.typeUrl());
- subscribedResourceTypeUrls.remove(type.typeUrlV2());
if (subscriber.xdsChannel != null) {
subscriber.xdsChannel.adjustResourceSubscription(type);
}
if (resourceSubscribers.get(type).isEmpty()) {
resourceSubscribers.remove(type);
+ subscribedResourceTypeUrls.remove(type.typeUrl());
+ subscribedResourceTypeUrls.remove(type.typeUrlV2());
}
}
}
diff --git a/xds/src/test/java/io/grpc/xds/XdsClientImplTestBase.java b/xds/src/test/java/io/grpc/xds/XdsClientImplTestBase.java
index bc91f39cb2f..2a91d7b5caf 100644
--- a/xds/src/test/java/io/grpc/xds/XdsClientImplTestBase.java
+++ b/xds/src/test/java/io/grpc/xds/XdsClientImplTestBase.java
@@ -921,6 +921,35 @@ public void ldsResourceUpdated() {
assertThat(channelForEmptyAuthority).isNull();
}
+ @Test
+ public void cancelResourceWatcherNotRemoveUrlSubscribers() {
+ DiscoveryRpcCall call = startResourceWatcher(XdsListenerResource.getInstance(), LDS_RESOURCE,
+ ldsResourceWatcher);
+ verifyResourceMetadataRequested(LDS, LDS_RESOURCE);
+
+ // Initial LDS response.
+ call.sendResponse(LDS, testListenerVhosts, VERSION_1, "0000");
+ call.verifyRequest(LDS, LDS_RESOURCE, VERSION_1, "0000", NODE);
+ verify(ldsResourceWatcher).onChanged(ldsUpdateCaptor.capture());
+ verifyGoldenListenerVhosts(ldsUpdateCaptor.getValue());
+ verifyResourceMetadataAcked(LDS, LDS_RESOURCE, testListenerVhosts, VERSION_1, TIME_INCREMENT);
+
+ xdsClient.watchXdsResource(XdsListenerResource.getInstance(),
+ LDS_RESOURCE + "1", ldsResourceWatcher);
+ xdsClient.cancelXdsResourceWatch(XdsListenerResource.getInstance(), LDS_RESOURCE + "1",
+ ldsResourceWatcher);
+
+ // Updated LDS response.
+ Any testListenerVhosts2 = Any.pack(mf.buildListenerWithApiListener(LDS_RESOURCE,
+ mf.buildRouteConfiguration("new", mf.buildOpaqueVirtualHosts(VHOST_SIZE))));
+ call.sendResponse(LDS, testListenerVhosts2, VERSION_2, "0001");
+ call.verifyRequest(LDS, LDS_RESOURCE, VERSION_2, "0001", NODE);
+ verify(ldsResourceWatcher).onChanged(ldsUpdateCaptor.capture());
+ verifyGoldenListenerVhosts(ldsUpdateCaptor.getValue());
+ verifyResourceMetadataAcked(LDS, LDS_RESOURCE, testListenerVhosts2, VERSION_2,
+ TIME_INCREMENT * 2);
+ }
+
@Test
public void ldsResourceUpdated_withXdstpResourceName() {
BootstrapperImpl.enableFederation = true;