From 7e1b93acae7b3536355e1b6149382ede3ff89cb8 Mon Sep 17 00:00:00 2001 From: Rafal Augustyniak Date: Tue, 20 Sep 2022 21:20:36 -0400 Subject: [PATCH 1/4] bump android test dependencies Signed-off-by: Rafal Augustyniak --- bazel/envoy_mobile_dependencies.bzl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bazel/envoy_mobile_dependencies.bzl b/bazel/envoy_mobile_dependencies.bzl index d44682ddb6..9ea5d82b23 100644 --- a/bazel/envoy_mobile_dependencies.bzl +++ b/bazel/envoy_mobile_dependencies.bzl @@ -82,14 +82,14 @@ def kotlin_dependencies(extra_maven_dependencies = []): "io.github.classgraph:classgraph:4.8.121", "io.netty:netty-all:4.1.74.Final", # Android test artifacts - "androidx.test:core:1.3.0", - "androidx.test:rules:1.3.0", - "androidx.test:runner:1.3.0", - "androidx.test:monitor:1.3.0", - "androidx.test.ext:junit:1.1.2", - "org.robolectric:robolectric:4.4", + "androidx.test:core:1.4.0", + "androidx.test:rules:1.4.0", + "androidx.test:runner:1.4.0", + "androidx.test:monitor:1.5.0", + "androidx.test.ext:junit:1.1.3", + "org.robolectric:robolectric:4.8", "org.hamcrest:hamcrest:2.2", - "com.google.truth:truth:1.1", + "com.google.truth:truth:1.1.3", ] + extra_maven_dependencies, version_conflict_policy = "pinned", repositories = [ From 16af9d72189d289d9feccdd7d6b25104373a1ba3 Mon Sep 17 00:00:00 2001 From: Rafal Augustyniak Date: Tue, 20 Sep 2022 21:59:43 -0400 Subject: [PATCH 2/4] fix robolectric bump Signed-off-by: Rafal Augustyniak --- bazel/envoy_mobile_dependencies.bzl | 2 +- bazel/envoy_mobile_repositories.bzl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bazel/envoy_mobile_dependencies.bzl b/bazel/envoy_mobile_dependencies.bzl index 9ea5d82b23..d8c91cabbf 100644 --- a/bazel/envoy_mobile_dependencies.bzl +++ b/bazel/envoy_mobile_dependencies.bzl @@ -87,7 +87,7 @@ def kotlin_dependencies(extra_maven_dependencies = []): "androidx.test:runner:1.4.0", "androidx.test:monitor:1.5.0", "androidx.test.ext:junit:1.1.3", - "org.robolectric:robolectric:4.8", + "org.robolectric:robolectric:4.8.2", "org.hamcrest:hamcrest:2.2", "com.google.truth:truth:1.1.3", ] + extra_maven_dependencies, diff --git a/bazel/envoy_mobile_repositories.bzl b/bazel/envoy_mobile_repositories.bzl index 763caccd49..615c6cecd7 100644 --- a/bazel/envoy_mobile_repositories.bzl +++ b/bazel/envoy_mobile_repositories.bzl @@ -147,9 +147,9 @@ def kotlin_repos(): http_archive( name = "robolectric", - sha256 = "d4f2eb078a51f4e534ebf5e18b6cd4646d05eae9b362ac40b93831bdf46112c7", - urls = ["https://github.com/robolectric/robolectric-bazel/archive/4.4.tar.gz"], - strip_prefix = "robolectric-bazel-4.4", + sha256 = "5bcde5db598f6938c9887a140a0a1249f95d3c16274d40869503d0c322a20d5d", + urls = ["https://github.com/robolectric/robolectric-bazel/archive/4.8.2.tar.gz"], + strip_prefix = "robolectric-bazel-4.8.2", ) def android_repos(): From 33b958f00f430d4310c0c87b7b3590888f5a4dda Mon Sep 17 00:00:00 2001 From: Rafal Augustyniak Date: Thu, 22 Sep 2022 14:57:33 -0400 Subject: [PATCH 3/4] bump robolectric Signed-off-by: Rafal Augustyniak --- .../chromium/net/BidirectionalStreamTest.java | 39 ++++++++++--------- .../chromium/net/RequestFinishedInfoTest.java | 2 +- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/test/java/org/chromium/net/BidirectionalStreamTest.java b/test/java/org/chromium/net/BidirectionalStreamTest.java index 424631f799..63bb05ff23 100644 --- a/test/java/org/chromium/net/BidirectionalStreamTest.java +++ b/test/java/org/chromium/net/BidirectionalStreamTest.java @@ -20,8 +20,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.SmallTest; -import com.android.org.chromium.net.NetError; - +import org.chromium.net.impl.Annotations.NetError; import org.chromium.net.impl.BidirectionalStreamNetworkException; import org.chromium.net.impl.CronetBidirectionalStream; import org.chromium.net.testing.CronetTestRule; @@ -1543,24 +1542,26 @@ public void testCronetEngineShutdownAfterStreamCancel() throws Exception { @OnlyRunNativeCronet @Ignore("https://github.com/envoyproxy/envoy-mobile/issues/1594") public void testErrorCodes() throws Exception { + // TODO(Augustyniak) cannot find symbol checkSpecificErrorCode(NetError.ERR_ADDRESS_UNREACHABLE" // Non-BidirectionalStream specific error codes. - checkSpecificErrorCode(NetError.ERR_NAME_NOT_RESOLVED, - NetworkException.ERROR_HOSTNAME_NOT_RESOLVED, false); - checkSpecificErrorCode(NetError.ERR_INTERNET_DISCONNECTED, - NetworkException.ERROR_INTERNET_DISCONNECTED, false); - checkSpecificErrorCode(NetError.ERR_NETWORK_CHANGED, NetworkException.ERROR_NETWORK_CHANGED, - true); - checkSpecificErrorCode(NetError.ERR_CONNECTION_CLOSED, NetworkException.ERROR_CONNECTION_CLOSED, - true); - checkSpecificErrorCode(NetError.ERR_CONNECTION_REFUSED, - NetworkException.ERROR_CONNECTION_REFUSED, false); - checkSpecificErrorCode(NetError.ERR_CONNECTION_RESET, NetworkException.ERROR_CONNECTION_RESET, - true); - checkSpecificErrorCode(NetError.ERR_CONNECTION_TIMED_OUT, - NetworkException.ERROR_CONNECTION_TIMED_OUT, true); - checkSpecificErrorCode(NetError.ERR_TIMED_OUT, NetworkException.ERROR_TIMED_OUT, true); - checkSpecificErrorCode(NetError.ERR_ADDRESS_UNREACHABLE, - NetworkException.ERROR_ADDRESS_UNREACHABLE, false); + // checkSpecificErrorCode(NetError.ERR_NAME_NOT_RESOLVED, + // NetworkException.ERROR_HOSTNAME_NOT_RESOLVED, false); + // checkSpecificErrorCode(NetError.ERR_INTERNET_DISCONNECTED, + // NetworkException.ERROR_INTERNET_DISCONNECTED, false); + // checkSpecificErrorCode(NetError.ERR_NETWORK_CHANGED, NetworkException.ERROR_NETWORK_CHANGED, + // true); + // checkSpecificErrorCode(NetError.ERR_CONNECTION_CLOSED, NetworkException.ERROR_CONNECTION_CLOSED, + // true); + // checkSpecificErrorCode(NetError.ERR_CONNECTION_REFUSED, + // NetworkException.ERROR_CONNECTION_REFUSED, false); + // checkSpecificErrorCode(NetError.ERR_CONNECTION_RESET, NetworkException.ERROR_CONNECTION_RESET, + // true); + // checkSpecificErrorCode(NetError.ERR_CONNECTION_TIMED_OUT, + // NetworkException.ERROR_CONNECTION_TIMED_OUT, true); + // checkSpecificErrorCode(NetError.ERR_TIMED_OUT, NetworkException.ERROR_TIMED_OUT, true); + // checkSpecificErrorCode(NetError.ERR_ADDRESS_UNREACHABLE, + // NetworkException.ERROR_ADDRESS_UNREACHABLE, false); + // TODO(https://github.com/envoyproxy/envoy-mobile/issues/1594) Missing error - code this. // BidirectionalStream specific retryable error codes. // checkSpecificErrorCode(NetError.ERR_HTTP2_PING_FAILED, NetworkException.ERROR_OTHER, true); diff --git a/test/java/org/chromium/net/RequestFinishedInfoTest.java b/test/java/org/chromium/net/RequestFinishedInfoTest.java index 0ff3b6ac19..9c8d7125d3 100644 --- a/test/java/org/chromium/net/RequestFinishedInfoTest.java +++ b/test/java/org/chromium/net/RequestFinishedInfoTest.java @@ -10,7 +10,7 @@ import android.os.ConditionVariable; import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.SmallTest; -import com.google.android.collect.Sets; +import com.google.common.collect.Sets; import java.util.ArrayList; import java.util.Date; import java.util.HashSet; From 42829b0cae76848208d1fb652463ce7f613f8fe7 Mon Sep 17 00:00:00 2001 From: Rafal Augustyniak Date: Thu, 22 Sep 2022 15:02:49 -0400 Subject: [PATCH 4/4] fix formatting Signed-off-by: Rafal Augustyniak --- test/java/org/chromium/net/BidirectionalStreamTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/java/org/chromium/net/BidirectionalStreamTest.java b/test/java/org/chromium/net/BidirectionalStreamTest.java index 63bb05ff23..8acc4be21d 100644 --- a/test/java/org/chromium/net/BidirectionalStreamTest.java +++ b/test/java/org/chromium/net/BidirectionalStreamTest.java @@ -1550,11 +1550,13 @@ public void testErrorCodes() throws Exception { // NetworkException.ERROR_INTERNET_DISCONNECTED, false); // checkSpecificErrorCode(NetError.ERR_NETWORK_CHANGED, NetworkException.ERROR_NETWORK_CHANGED, // true); - // checkSpecificErrorCode(NetError.ERR_CONNECTION_CLOSED, NetworkException.ERROR_CONNECTION_CLOSED, + // checkSpecificErrorCode(NetError.ERR_CONNECTION_CLOSED, + // NetworkException.ERROR_CONNECTION_CLOSED, // true); // checkSpecificErrorCode(NetError.ERR_CONNECTION_REFUSED, // NetworkException.ERROR_CONNECTION_REFUSED, false); - // checkSpecificErrorCode(NetError.ERR_CONNECTION_RESET, NetworkException.ERROR_CONNECTION_RESET, + // checkSpecificErrorCode(NetError.ERR_CONNECTION_RESET, + // NetworkException.ERROR_CONNECTION_RESET, // true); // checkSpecificErrorCode(NetError.ERR_CONNECTION_TIMED_OUT, // NetworkException.ERROR_CONNECTION_TIMED_OUT, true);