From commits-return-825-archive-asf-public=cust-asf.ponee.io@zipkin.apache.org Mon May 6 22:49:32 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id E1C3A18060F for ; Tue, 7 May 2019 00:49:31 +0200 (CEST) Received: (qmail 6331 invoked by uid 500); 6 May 2019 22:49:31 -0000 Mailing-List: contact commits-help@zipkin.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zipkin.apache.org Delivered-To: mailing list commits@zipkin.apache.org Received: (qmail 6316 invoked by uid 99); 6 May 2019 22:49:31 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 May 2019 22:49:31 +0000 From: GitBox To: commits@zipkin.apache.org Subject: [GitHub] [incubator-zipkin] Logic-32 commented on a change in pull request #2502: Adding storage-throttle module to address "over capacity" issues Message-ID: <155718296616.15994.7336751743630140914.gitbox@gitbox.apache.org> Date: Mon, 06 May 2019 22:49:26 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Logic-32 commented on a change in pull request #2502: Adding storage-throttle module to address "over capacity" issues URL: https://github.com/apache/incubator-zipkin/pull/2502#discussion_r281395125 ########## File path: zipkin-server/src/test/java/zipkin2/server/internal/throttle/FakeCall.java ########## @@ -0,0 +1,62 @@ +/* + * 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 zipkin2.server.internal.throttle; + +import java.io.IOException; +import java.util.concurrent.RejectedExecutionException; +import zipkin2.Call; +import zipkin2.Callback; + +class FakeCall extends Call { Review comment: I waffled a bit on extending Call.Base a bit in ThrottledCall. Should I do it there? I can probably get rid of some logic around `canceled` if I do. As for inlining the type, how would I do that with a call? It's not a FunctionalInterface. It is also used a few tests in ThrottledCallTest. Is that sufficient to keep this separate? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services