Skip to content

Commit

Permalink
Replace C2P resolver env var with experimental scheme suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
apolcyn committed Dec 7, 2021
1 parent 5cc94a5 commit f793a83
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Expand Up @@ -29,9 +29,7 @@
@Internal
public final class GoogleCloudToProdNameResolverProvider extends NameResolverProvider {

private static final boolean enableC2PResolver =
Boolean.parseBoolean(System.getenv("GRPC_EXPERIMENTAL_GOOGLE_C2P_RESOLVER"));
private static final String SCHEME = "google-c2p";
private static final String SCHEME = "google-c2p-experimental";

@Override
public NameResolver newNameResolver(URI targetUri, Args args) {
Expand All @@ -50,10 +48,7 @@ public String getDefaultScheme() {

@Override
protected boolean isAvailable() {
if (enableC2PResolver) {
return true;
}
return false;
return true;
}

@Override
Expand Down
Expand Up @@ -69,7 +69,7 @@ public class GoogleCloudToProdNameResolverTest {
@Rule
public final MockitoRule mocks = MockitoJUnit.rule();

private static final URI TARGET_URI = URI.create("google-c2p:///googleapis.com");
private static final URI TARGET_URI = URI.create("google-c2p-experimental:///googleapis.com");
private static final String ZONE = "us-central1-a";
private static final int DEFAULT_PORT = 887;

Expand Down

0 comments on commit f793a83

Please sign in to comment.