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 575EE200BD4 for ; Fri, 16 Dec 2016 09:40:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 56255160B32; Fri, 16 Dec 2016 08:40:00 +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 A0A63160B24 for ; Fri, 16 Dec 2016 09:39:59 +0100 (CET) Received: (qmail 91392 invoked by uid 500); 16 Dec 2016 08:39:58 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 91368 invoked by uid 99); 16 Dec 2016 08:39:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Dec 2016 08:39:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 5E7472C03E1 for ; Fri, 16 Dec 2016 08:39:58 +0000 (UTC) Date: Fri, 16 Dec 2016 08:39:58 +0000 (UTC) From: "Dawid Weiss (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LUCENE-7595) RAMUsageTester in test-framework and static field checker no longer works with Java 9 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 16 Dec 2016 08:40:00 -0000 [ https://issues.apache.org/jira/browse/LUCENE-7595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15753834#comment-15753834 ] Dawid Weiss commented on LUCENE-7595: ------------------------------------- I agree certain classes could be approximated (like String, Lists, etc.). bq. Disallow any static field in tests that is not final (constant) and points to an Object except: Strings and native (wrapper) types. The check could be less strict -- we could fail if the value of such a field is non-null after the test and permit nullified reference fields. > RAMUsageTester in test-framework and static field checker no longer works with Java 9 > ------------------------------------------------------------------------------------- > > Key: LUCENE-7595 > URL: https://issues.apache.org/jira/browse/LUCENE-7595 > Project: Lucene - Core > Issue Type: Bug > Components: general/test > Reporter: Uwe Schindler > Assignee: Uwe Schindler > Labels: Java9 > > Lucene/Solr tests have a special rule that records memory usage in static fields before and after test, so we can detect memory leaks. This check dives into JDK classes (like java.lang.String to detect their size). As Java 9 build 148 completely forbids setAccessible on any runtime class, we have to change or disable this check: > - As first step I will only add the rule to LTC, if we not have Java 8 > - As a second step we might investigate how to improve this > [~rcmuir] had some ideas for the 2nd point: > - Don't dive into classes from JDK modules and instead "estimate" the size for some special cases (like Strings) > - Disallow any static field in tests that is not final (constant) and points to an Object except: Strings and native (wrapper) types. > In addition we also have RAMUsageTester, that has similar problems and is used to compare estimations of Lucene's calculations of Codec/IndexWriter/IndexReader memory usage with reality. We should simply disable those tests. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org