File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
google-cloud-datastore/src/test/java/com/google/cloud/datastore Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,23 @@ public void testDatastore() {
103103 assertSame (datastoreRpc , options .build ().getRpc ());
104104 }
105105
106+ @ Test
107+ public void testGrpcDefaultChannelConfigurations () {
108+ DatastoreOptions datastoreOptions =
109+ DatastoreOptions .newBuilder ()
110+ .setServiceRpcFactory (datastoreRpcFactory )
111+ .setProjectId (PROJECT_ID )
112+ .setDatabaseId (DATABASE_ID )
113+ .setTransportOptions (GrpcTransportOptions .newBuilder ().build ())
114+ .setCredentials (NoCredentials .getInstance ())
115+ .setHost ("http://localhost:" + PORT )
116+ .build ();
117+ ChannelPoolSettings channelPoolSettings = ((InstantiatingGrpcChannelProvider ) datastoreOptions .getTransportChannelProvider ()).getChannelPoolSettings ();
118+ assertEquals (channelPoolSettings .getInitialChannelCount (), 1 );
119+ assertEquals (channelPoolSettings .getMinChannelCount (), 1 );
120+ assertEquals (channelPoolSettings .getMaxChannelCount (), 4 );
121+ }
122+
106123 @ Test
107124 public void testCustomChannelAndCredentials () {
108125 InstantiatingGrpcChannelProvider channelProvider =
You can’t perform that action at this time.
0 commit comments