Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6E4C2200CCB for ; Thu, 20 Jul 2017 18:27:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6C92E16BA78; Thu, 20 Jul 2017 16:27:10 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B224D16BA77 for ; Thu, 20 Jul 2017 18:27:09 +0200 (CEST) Received: (qmail 14896 invoked by uid 500); 20 Jul 2017 16:27:08 -0000 Mailing-List: contact issues-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list issues@geode.apache.org Received: (qmail 14885 invoked by uid 99); 20 Jul 2017 16:27:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jul 2017 16:27:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 4A922C34AF for ; Thu, 20 Jul 2017 16:27:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.001 X-Spam-Level: X-Spam-Status: No, score=-100.001 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id mIob4d3LCOsR for ; Thu, 20 Jul 2017 16:27:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 9FEFD5FDEE for ; Thu, 20 Jul 2017 16:27:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D4117E0DFC for ; Thu, 20 Jul 2017 16:27:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3CE0921ECE for ; Thu, 20 Jul 2017 16:27:00 +0000 (UTC) Date: Thu, 20 Jul 2017 16:27:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@geode.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GEODE-3213) Refactor Protobuf Serialization Implemenation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 20 Jul 2017 16:27:10 -0000 [ https://issues.apache.org/jira/browse/GEODE-3213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16094916#comment-16094916 ] ASF GitHub Bot commented on GEODE-3213: --------------------------------------- Github user kohlmu-pivotal commented on a diff in the pull request: https://github.com/apache/geode/pull/646#discussion_r128386349 --- Diff: geode-protobuf/src/test/java/org/apache/geode/protocol/protobuf/operations/PutRequestOperationHandlerJUnitTest.java --- @@ -124,20 +128,19 @@ public void test_RegionThrowsClasscastException() throws CodecAlreadyRegisteredF when(regionMock.put(any(), any())).thenThrow(ClassCastException.class); PutRequestOperationHandler operationHandler = new PutRequestOperationHandler(); - ClientProtocol.Response response = + Result result = operationHandler.process(serializationServiceStub, generateTestRequest(), cacheStub); - Assert.assertEquals(ClientProtocol.Response.ResponseAPICase.ERRORRESPONSE, - response.getResponseAPICase()); + Assert.assertTrue(result instanceof Failure); --- End diff -- Do we need to assert at the error message > Refactor Protobuf Serialization Implemenation > --------------------------------------------- > > Key: GEODE-3213 > URL: https://issues.apache.org/jira/browse/GEODE-3213 > Project: Geode > Issue Type: Improvement > Components: client/server, serialization > Reporter: Udo Kohlmeyer > > In the Protobuf serialization implementation, there are some refactorings we want to make: > * OperationHandlers take OperationRequest and OperationResponse message, not the parent Request/Response Object > * A generic flow needs to be implemented that all OperationHandlers follow. No bespoke flows for any OperationHandlers... way too much maintenance > * Use Functional semantics to configure the functionality to extract OperationRequest from Request (per OperationHandler) > * Use Functional semantics to configure the functionality to populate OperationResponse in the relevant Response > * Have generic Error Handling framework to populate "known" errors and error codes -- This message was sent by Atlassian JIRA (v6.4.14#64029)