Skip to content

Commit 8fa4c21

Browse files
committed
Merge remote-tracking branch 'origin/intent-name-resolver' into intent-name-resolver
2 parents c65911a + 2b926e9 commit 8fa4c21

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

binder/src/androidTest/java/io/grpc/binder/BinderChannelSmokeTest.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
import java.io.IOException;
5959
import java.io.InputStream;
6060
import java.util.ArrayList;
61+
import java.util.concurrent.ExecutionException;
6162
import java.util.concurrent.Executors;
6263
import java.util.concurrent.atomic.AtomicReference;
6364
import org.junit.After;
@@ -158,6 +159,21 @@ public void setUp() throws Exception {
158159
.build();
159160
}
160161

162+
@Test
163+
public void testConnectViaIntentTargetUri() throws Exception {
164+
// TODO(jdcormie): Make this test good.
165+
channel = BinderChannelBuilder.forTarget("intent://foo/bar", appContext).build();
166+
// channel = BinderChannelBuilder.forTarget("android-app://com.foo.bar/authoritaaay",
167+
// appContext).build();
168+
ListenableFuture<String> resultFuture = doCall("Hello");
169+
try {
170+
resultFuture.get();
171+
} catch (ExecutionException ee) {
172+
StatusRuntimeException sre = (StatusRuntimeException) ee.getCause();
173+
assertThat(sre.getStatus().getCode()).isEqualTo(Code.UNIMPLEMENTED);
174+
}
175+
}
176+
161177
@After
162178
public void tearDown() throws Exception {
163179
channel.shutdownNow();

0 commit comments

Comments
 (0)