accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubbsii <>
Subject [GitHub] accumulo pull request #219: ACCUMULO-4584 Remove oneway method checks
Date Wed, 22 Feb 2017 18:41:23 GMT
Github user ctubbsii commented on a diff in the pull request:
    --- Diff: test/src/main/java/org/apache/accumulo/test/rpc/ ---
    @@ -0,0 +1,191 @@
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.accumulo.test.rpc;
    +import java.util.Arrays;
    +import java.util.HashMap;
    +import java.util.Map;
    +import java.util.concurrent.TimeUnit;
    +import org.apache.accumulo.test.categories.SunnyDayTests;
    +import org.apache.accumulo.test.rpc.thrift.SimpleThriftService;
    +import org.apache.log4j.Level;
    +import org.apache.log4j.Logger;
    +import org.apache.thrift.ProcessFunction;
    +import org.apache.thrift.TApplicationException;
    +import org.apache.thrift.TException;
    +import org.apache.thrift.server.TSimpleServer;
    +import org.hamcrest.core.IsInstanceOf;
    +import org.junit.After;
    +import org.junit.Assert;
    +import org.junit.Before;
    +import org.junit.Rule;
    +import org.junit.Test;
    +import org.junit.experimental.categories.Category;
    +import org.junit.rules.ExpectedException;
    +import org.junit.rules.TestName;
    +import org.junit.rules.Timeout;
    +public class ThriftBehaviorIT {
    +  @Rule
    +  public Timeout timeout = new Timeout(5, TimeUnit.SECONDS);
    +  @Rule
    +  public TestName testName = new TestName();
    +  @Rule
    +  public ExpectedException exception = ExpectedException.none();
    +  private SimpleThriftService.Client client;
    +  private SimpleThriftServiceHandler handler;
    +  private SimpleThriftServiceRunner serviceRunner;
    +  private String propName;
    +  private Map<Logger,Level> oldLogLevels = new HashMap<>();
    +  private static final String KITTY_MSG = "🐈 Kitty! 🐈";
    +  // can delete wrapper when tests pass without using it (assuming tests are good enough)
    +  private static final boolean USE_RPC_WRAPPER = true;
    --- End diff --
    We don't need the wrapper for oneway checks, and that has been removed from the wrapper.
However, we still need it to handle the lack of RuntimeException - to - TApplicationException
mapping that regressed in THRIFT-1805. The fact that the tests pass without the oneway checks
means that we don't need them any more in the wrapper.

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 or file a JIRA ticket
with INFRA.

View raw message