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 83FCA200B50 for ; Fri, 29 Jul 2016 17:41:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 811B2160AAE; Fri, 29 Jul 2016 15:41:22 +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 D5421160A79 for ; Fri, 29 Jul 2016 17:41:21 +0200 (CEST) Received: (qmail 35625 invoked by uid 500); 29 Jul 2016 15:41:21 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 35593 invoked by uid 99); 29 Jul 2016 15:41:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jul 2016 15:41:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id DBF992C029E for ; Fri, 29 Jul 2016 15:41:20 +0000 (UTC) Date: Fri, 29 Jul 2016 15:41:20 +0000 (UTC) From: "Sylvain Lebresne (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-11635) test-clientutil-jar unit test fails MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 29 Jul 2016 15:41:22 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-11635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15399531#comment-15399531 ] Sylvain Lebresne commented on CASSANDRA-11635: ---------------------------------------------- Ok, I got confused because I was running the test as part of the normal {{ant test}} target, and was looking at a job failure on CI, but it's actually the specific {{ant test-clientutil-jar}} target, which is run by CI but whose failure doesn't seem to be reported (as far as I can tell, and unless you manually check the console output). Anyway, the original error message with Sigar actually makes sense: we did make sigar a dependency of UUIDGen and forgot to add it to the {{clientutil.jar}}. That's still the error with which the test fails on 2.2 and 3.0 and I'm attaching below simple update to fix the test. I didn't bother running CI because it only changes the build file, and only the target related to {{clientutil.java}}, which as said above is not even reported by CI. It's easy enough to check locally that it fixes the test though. | [11635-2.2|https://github.com/pcmanus/cassandra/commits/11635-2.2] | | [11635-3.0|https://github.com/pcmanus/cassandra/commits/11635-3.0] | It does is worth noting that the inclusion of sigar will make the use of clientutil.jar a tad more annoying as you need to put sigar's binary for your architecture. Or more precisely, you don't _need_ to, but you'll get an ugly error message if you don't. I'm not entirely sure clientutil.jar is still in use though, and as I said, it's not actually mandatory, so I'm not convinced it's a problem, but still mentioning it for completness. Now, that leaves the issue on trunk (or 3.9 for that matter). And I'm not entirely sure why the test complains about {{IPartitioner}}. What I do know is that the reason it complains on 3.x and not on 3.0.x is CASSANDRA-12002. For some reason, the code that patch added to {{FBUtilities}} triggers the problem (the test pass if I revert those changes). Which is weird in the sense that those change only included 2 new methods returning {{IPartitioner}} but there already has one before. I'm not an expert in class loaders though. Anyway, I'm not sure what is the right fix for 3.x. I could try to randomly bend the code in {{FBUtilities}} to make the test happy, or move that code somewhere else (even more random), or spend a few hours understanding the subtlety of the class loader, but as I said above, I'm not really sure clientutil.java is used anywhere anymore as the functionality it offers is provided by other clients, and those other clients don't use it. So I'm seriously wondering if the most progmatic solution isn't to just stop providing that jar in 3.x (and if you really depend on that jar, you're probably better off sticking to an old version anyway). Any opinions? > test-clientutil-jar unit test fails > ----------------------------------- > > Key: CASSANDRA-11635 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11635 > Project: Cassandra > Issue Type: Test > Components: Testing > Reporter: Michael Shuler > Assignee: Sylvain Lebresne > Labels: unittest > Fix For: 2.2.x, 3.0.x, 3.x > > > {noformat} > test-clientutil-jar: > [junit] Testsuite: org.apache.cassandra.serializers.ClientUtilsTest > [junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.314 sec > [junit] > [junit] Testcase: test(org.apache.cassandra.serializers.ClientUtilsTest): Caused an ERROR > [junit] org/apache/cassandra/utils/SigarLibrary > [junit] java.lang.NoClassDefFoundError: org/apache/cassandra/utils/SigarLibrary > [junit] at org.apache.cassandra.utils.UUIDGen.hash(UUIDGen.java:328) > [junit] at org.apache.cassandra.utils.UUIDGen.makeNode(UUIDGen.java:307) > [junit] at org.apache.cassandra.utils.UUIDGen.makeClockSeqAndNode(UUIDGen.java:256) > [junit] at org.apache.cassandra.utils.UUIDGen.(UUIDGen.java:39) > [junit] at org.apache.cassandra.serializers.ClientUtilsTest.test(ClientUtilsTest.java:56) > [junit] Caused by: java.lang.ClassNotFoundException: org.apache.cassandra.utils.SigarLibrary > [junit] at java.net.URLClassLoader.findClass(URLClassLoader.java:381) > [junit] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > [junit] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) > [junit] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > [junit] > [junit] > [junit] Test org.apache.cassandra.serializers.ClientUtilsTest FAILED > BUILD FAILED > {noformat} > I'll see if I can find a spot where this passes, but it appears to have been failing for a long time. -- This message was sent by Atlassian JIRA (v6.3.4#6332)