Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions bazel/envoy_mobile_dependencies.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ def kotlin_dependencies(extra_maven_dependencies = []):
"io.github.classgraph:classgraph:4.8.149",
"io.netty:netty-all:4.1.82.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.2",
"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 = [
Expand Down
6 changes: 3 additions & 3 deletions bazel/envoy_mobile_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
41 changes: 22 additions & 19 deletions test/java/org/chromium/net/BidirectionalStreamTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -1543,24 +1542,28 @@ 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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RyanTheOptimist I'm good commenting these out if you are. I hate to have upgrades blocked on it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this sounds reasonable, but we should probably file an issue about this so we don't lose track of it. Maybe @colibie has thoughts on how to resolve the missing symbol issues.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out the previous impl was using the symbols from the cronet in the android platform. Will fix this with PR2568

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@colibie thank you for the context. I am going to wait with my PR until yours is merged then.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can merge yours, I'll update mine. Still making some changes on it anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without your changes I need to leave one test commented out (https://github.com/envoyproxy/envoy-mobile/pull/2565/files#diff-8485610ff0b92707ee93e0eea000f53290572a1a726520b879a1d15580f0e9bfR1545) as we are missing NetError symbols. I guess I can merge my PR in here and follow up on the added TODO once your PR is merged.

// 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);
Expand Down
2 changes: 1 addition & 1 deletion test/java/org/chromium/net/RequestFinishedInfoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down