cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-11635) test-clientutil-jar unit test fails
Date Fri, 29 Jul 2016 15:41:20 GMT


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 {{}},
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|] |
| [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 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:
>             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
>     [junit] org/apache/cassandra/utils/SigarLibrary
>     [junit] java.lang.NoClassDefFoundError: org/apache/cassandra/utils/SigarLibrary
>     [junit]     at org.apache.cassandra.utils.UUIDGen.hash(
>     [junit]     at org.apache.cassandra.utils.UUIDGen.makeNode(
>     [junit]     at org.apache.cassandra.utils.UUIDGen.makeClockSeqAndNode(
>     [junit]     at org.apache.cassandra.utils.UUIDGen.<clinit>(
>     [junit]     at org.apache.cassandra.serializers.ClientUtilsTest.test(
>     [junit] Caused by: java.lang.ClassNotFoundException: org.apache.cassandra.utils.SigarLibrary
>     [junit]     at
>     [junit]     at java.lang.ClassLoader.loadClass(
>     [junit]     at sun.misc.Launcher$AppClassLoader.loadClass(
>     [junit]     at java.lang.ClassLoader.loadClass(
>     [junit] 
>     [junit] 
>     [junit] Test org.apache.cassandra.serializers.ClientUtilsTest 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

View raw message