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 05FC0200BEC for ; Thu, 29 Dec 2016 23:02:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 04A42160B2D; Thu, 29 Dec 2016 22:02:05 +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 4D49A160B23 for ; Thu, 29 Dec 2016 23:02:04 +0100 (CET) Received: (qmail 24170 invoked by uid 500); 29 Dec 2016 22:01:58 -0000 Mailing-List: contact dev-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list dev@drill.apache.org Received: (qmail 24117 invoked by uid 99); 29 Dec 2016 22:01:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Dec 2016 22:01:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 51CD32C03DE for ; Thu, 29 Dec 2016 22:01:58 +0000 (UTC) Date: Thu, 29 Dec 2016 22:01:58 +0000 (UTC) From: "Paul Rogers (JIRA)" To: dev@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (DRILL-5170) Mockito-based unit tests fail when run under Java 8 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 29 Dec 2016 22:02:05 -0000 Paul Rogers created DRILL-5170: ---------------------------------- Summary: Mockito-based unit tests fail when run under Java 8 Key: DRILL-5170 URL: https://issues.apache.org/jira/browse/DRILL-5170 Project: Apache Drill Issue Type: Bug Affects Versions: 1.8.0 Reporter: Paul Rogers Priority: Minor Drill makes extensive use of the Mockito mocking library. Drill uses a very old version of Mockito. Mockito appears to perform byte-code manipulations that are incompatible with Java 8. For example: {code} cd exec/java-exec/ mvn surefire:test -Dtest=TestSimpleProjection Running org.apache.drill.exec.physical.impl.project.TestSimpleProjection#project Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.794 sec <<< FAILURE! - in org.apache.drill.exec.physical.impl.project.TestSimpleProjection project(org.apache.drill.exec.physical.impl.project.TestSimpleProjection) Time elapsed: 0.215 sec <<< ERROR! java.lang.VerifyError: null at sun.instrument.InstrumentationImpl.redefineClasses0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.lang.reflect.Method.invoke(Method.java:498) {code} A similar error occurs when running the same unit test under Eclipse. Fixing this issue is non-trivial. Mockito is subject to rapid change. The semantics of mocks has changed significantly. Code that works fine in our old version requires extensive rework to work with the current version. For now, the only workaround is to compile Drill under the (obsolete) Java 7 and use that version to run unit tests. -- This message was sent by Atlassian JIRA (v6.3.4#6332)