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 AD33E200C23 for ; Wed, 22 Feb 2017 19:41:25 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id ABC6E160B62; Wed, 22 Feb 2017 18:41:25 +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 EF580160B49 for ; Wed, 22 Feb 2017 19:41:24 +0100 (CET) Received: (qmail 62141 invoked by uid 500); 22 Feb 2017 18:41:23 -0000 Mailing-List: contact dev-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list dev@accumulo.apache.org Received: (qmail 62126 invoked by uid 99); 22 Feb 2017 18:41:23 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2017 18:41:23 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4C8D1DFF0B; Wed, 22 Feb 2017 18:41:23 +0000 (UTC) From: ctubbsii To: dev@accumulo.apache.org Reply-To: dev@accumulo.apache.org References: In-Reply-To: Subject: [GitHub] accumulo pull request #219: ACCUMULO-4584 Remove oneway method checks Content-Type: text/plain Message-Id: <20170222184123.4C8D1DFF0B@git1-us-west.apache.org> Date: Wed, 22 Feb 2017 18:41:23 +0000 (UTC) archived-at: Wed, 22 Feb 2017 18:41:25 -0000 Github user ctubbsii commented on a diff in the pull request: https://github.com/apache/accumulo/pull/219#discussion_r102539210 --- Diff: test/src/main/java/org/apache/accumulo/test/rpc/ThriftBehaviorIT.java --- @@ -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 + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * 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; + +@Category(SunnyDayTests.class) +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 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 infrastructure@apache.org or file a JIRA ticket with INFRA. ---