geode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kohlmu-pivotal <...@git.apache.org>
Subject [GitHub] geode pull request #646: GEODE-3213: Refactor ProtoBuf handler flow
Date Thu, 20 Jul 2017 16:26:10 GMT
Github user kohlmu-pivotal commented on a diff in the pull request:

    https://github.com/apache/geode/pull/646#discussion_r128386432
  
    --- Diff: geode-protobuf/src/test/java/org/apache/geode/protocol/protobuf/operations/PutRequestOperationHandlerJUnitTest.java
---
    @@ -99,23 +105,21 @@ public void test_codecNotRegistered() throws CodecAlreadyRegisteredForTypeExcept
             TEST_KEY.getBytes(Charset.forName("UTF-8")))).thenThrow(exception);
         PutRequestOperationHandler operationHandler = new PutRequestOperationHandler();
     
    -    ClientProtocol.Response response =
    +    Result<RegionAPI.PutResponse> result =
             operationHandler.process(serializationServiceStub, generateTestRequest(), cacheStub);
     
    -    Assert.assertEquals(ClientProtocol.Response.ResponseAPICase.ERRORRESPONSE,
    -        response.getResponseAPICase());
    +    Assert.assertTrue(result instanceof Failure);
       }
     
       @Test
       public void test_RegionNotFound() throws CodecAlreadyRegisteredForTypeException,
           UnsupportedEncodingTypeException, CodecNotRegisteredForTypeException {
         when(cacheStub.getRegion(TEST_REGION)).thenReturn(null);
         PutRequestOperationHandler operationHandler = new PutRequestOperationHandler();
    -    ClientProtocol.Response response =
    +    Result<RegionAPI.PutResponse> result =
             operationHandler.process(serializationServiceStub, generateTestRequest(), cacheStub);
     
    -    Assert.assertEquals(ClientProtocol.Response.ResponseAPICase.ERRORRESPONSE,
    -        response.getResponseAPICase());
    +    Assert.assertTrue(result instanceof Failure);
    --- End diff --
    
    We need to assert at least the error message. Maybe later on the error code


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message