From dev-return-67714-archive-asf-public=cust-asf.ponee.io@hbase.apache.org Thu Jan 25 23:02:06 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 13B38180651 for ; Thu, 25 Jan 2018 23:02:06 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 03FA3160C51; Thu, 25 Jan 2018 22:02:06 +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 4D503160C17 for ; Thu, 25 Jan 2018 23:02:05 +0100 (CET) Received: (qmail 82333 invoked by uid 500); 25 Jan 2018 22:02:04 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 82316 invoked by uid 99); 25 Jan 2018 22:02:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jan 2018 22:02:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id A49841A0DA9 for ; Thu, 25 Jan 2018 22:02:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.711 X-Spam-Level: X-Spam-Status: No, score=-100.711 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id AaLU4MjoSzcJ for ; Thu, 25 Jan 2018 22:02: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 363275F23E for ; Thu, 25 Jan 2018 22:02:02 +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 3AC18E12AB for ; Thu, 25 Jan 2018 22:02:01 +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 9E4DD24106 for ; Thu, 25 Jan 2018 22:02:00 +0000 (UTC) Date: Thu, 25 Jan 2018 22:02:00 +0000 (UTC) From: "Appy (JIRA)" To: dev@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HBASE-19862) Fix TestTokenAuthentication - fake RegionCoprocessorEnvironment is not of type HasRegionServerServices MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Appy created HBASE-19862: ---------------------------- Summary: Fix TestTokenAuthentication - fake RegionCoprocessorEnvironment is not of type HasRegionServerServices Key: HBASE-19862 URL: https://issues.apache.org/jira/browse/HBASE-19862 Project: HBase Issue Type: Bug Reporter: Appy Assignee: Appy We have temporary HasRegionServerServices (added in HBASE-19007) and concept of CoreCoprocessors which require that whichever *CoprocessorEnvironment they get, it should also implement HasRegionServerServices. This test builds mock RegionCpEnv for TokenProvider (RegionCoprocessor), but it falls short of what's expected and results in following exceptions in test logs {noformat} 2018-01-25 14:38:54,855 ERROR [TokenServer:d9a9782cd075,39492,1516891133911] helpers.MarkerIgnoringBase(159): Aborting on: org.apache.hadoop.hbase.security.token.TestTokenAuthentication$TokenServer$2 cannot be cast to org.apache.hadoop.hbase.coprocessor.HasRegionServerServices java.lang.ClassCastException: org.apache.hadoop.hbase.security.token.TestTokenAuthentication$TokenServer$2 cannot be cast to org.apache.hadoop.hbase.coprocessor.HasRegionServerServices at org.apache.hadoop.hbase.security.token.TokenProvider.start(TokenProvider.java:70) at org.apache.hadoop.hbase.security.token.TestTokenAuthentication$TokenServer.initialize(TestTokenAuthentication.java:275) at org.apache.hadoop.hbase.security.token.TestTokenAuthentication$TokenServer.run(TestTokenAuthentication.java:347) {noformat} Patch adds the missing interface to the mock. Also, uses Mockito to mock the interfaces rather the crude way. -- This message was sent by Atlassian JIRA (v7.6.3#76005)