[ https://issues.apache.org/jira/browse/GEODE-3141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16086089#comment-16086089 ]
ASF GitHub Bot commented on GEODE-3141: --------------------------------------- Github user pivotal-amurmann commented on a diff in the pull request: https://github.com/apache/geode/pull/630#discussion_r127285154 --- Diff: geode-protobuf/src/test/java/org/apache/geode/protocol/RoundTripCacheConnectionJUnitTest.java --- @@ -278,6 +278,31 @@ public void useSSL_testNewProtocolHeaderLeadsToNewProtocolServerConnection() thr testNewProtocolHeaderLeadsToNewProtocolServerConnection(); } + @Test + public void testNewProtocolGetRegionCallSucceeds() throws Exception { + System.setProperty("geode.feature-protobuf-protocol", "true"); + + Socket socket = new Socket("localhost", cacheServerPort); + Awaitility.await().atMost(5, TimeUnit.SECONDS).until(socket::isConnected); + OutputStream outputStream = socket.getOutputStream(); + outputStream.write(110); + + + ProtobufProtocolSerializer protobufProtocolSerializer = new ProtobufProtocolSerializer(); + ClientProtocol.Message getRegionMessage = + MessageUtil.makeGetRegionRequestMessage(TEST_REGION, ClientProtocol.MessageHeader.newBuilder().build()); + protobufProtocolSerializer.serialize(getRegionMessage, outputStream); + + ClientProtocol.Message message = + protobufProtocolSerializer.deserialize(socket.getInputStream()); + assertEquals(ClientProtocol.Message.MessageTypeCase.RESPONSE, message.getMessageTypeCase()); + ClientProtocol.Response response = message.getResponse(); + assertEquals(ClientProtocol.Response.ResponseAPICase.GETREGIONRESPONSE, + response.getResponseAPICase()); + response.getGetRegionResponse(); + //TODO add some assertions for Region data --- End diff -- Can we either add the assertions or put a chore in the backlog to backfill this? > New flow: GetRegion > ------------------- > > Key: GEODE-3141 > URL: https://issues.apache.org/jira/browse/GEODE-3141 > Project: Geode > Issue Type: Sub-task > Components: client/server > Reporter: Brian Baynes > Assignee: Udo Kohlmeyer > > Users of the new client/server protocol need to be able to verify a region > exists in the cache. Implement GetRegion message/handler, returning boolean > success(/failure) based on the existence of a Region when passed a Region > name. -- This message was sent by Atlassian JIRA (v6.4.14#64029)