[ 
https://issues.apache.org/jira/browse/CASSANDRA-3864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13201486#comment-13201486
 ] 

Sylvain Lebresne commented on CASSANDRA-3864:
---------------------------------------------

Attached patches are fixing failures 1, 2 and 3 above. More precisely:
# SSTableImportTest: the patch speaks for itself. It's likely due a change of 
the jackson lib version or something like that.
# CompositeTypeTest: this is a regression of commit 96ecaff5 that removed a 
perfectly fine (and useful) method
# DefsTest: CASSANDRA-3657 mad possible the kind of comparator change the test 
was testing (UTF8Type -> BytesType). The patch replaces that by a 
non-compatible change.

For the CompactSerializerTest, I'm a little bit less sure what the right fix 
is. As weird as that sound, the problem comes from BulkRecordWriter. Somehow 
the class is loaded by the test, which makes it replace the config field of 
DatabaseDescriptor by a Config object where data_file_directories is null (more 
precisely DatabaseDescriptor.initDefaultsOnly() is called). I'm pretty sure 
there is something a little bit ugly in there, but since I'm not sure how 
BulkRecordWriter is supposed to be used, I leave that to someone else.
                
> Unit tests failures in 1.1
> --------------------------
>
>                 Key: CASSANDRA-3864
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3864
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>         Attachments: 0001-Fix-DefsTest.patch, 
> 0002-Fix-SSTableImportTest.patch, 0003-Fix-CompositeTypeTest.patch
>
>
> On the current 1.1 branch I get the following errors:
> # SSTableImportTest:
> {noformat}
> [junit] Testcase: 
> testImportSimpleCf(org.apache.cassandra.tools.SSTableImportTest):   Caused an 
> ERROR
> [junit] java.lang.Integer cannot be cast to java.lang.Long
> [junit] java.lang.ClassCastException: java.lang.Integer cannot be cast to 
> java.lang.Long
> [junit]       at 
> org.apache.cassandra.tools.SSTableImport$JsonColumn.<init>(SSTableImport.java:132)
> [junit]       at 
> org.apache.cassandra.tools.SSTableImport.addColumnsToCF(SSTableImport.java:191)
> [junit]       at 
> org.apache.cassandra.tools.SSTableImport.addToStandardCF(SSTableImport.java:174)
> [junit]       at 
> org.apache.cassandra.tools.SSTableImport.importUnsorted(SSTableImport.java:290)
> [junit]       at 
> org.apache.cassandra.tools.SSTableImport.importJson(SSTableImport.java:255)
> [junit]       at 
> org.apache.cassandra.tools.SSTableImportTest.testImportSimpleCf(SSTableImportTest.java:60)
> {noformat}
> # CompositeTypeTest:
> {noformat}
> [junit] Testcase: 
> testCompatibility(org.apache.cassandra.db.marshal.CompositeTypeTest):       
> Caused an ERROR
> [junit] Invalid comparator class 
> org.apache.cassandra.db.marshal.CompositeType: must define a public static 
> instance field or a public static method getInstance(TypeParser).
> [junit] org.apache.cassandra.config.ConfigurationException: Invalid 
> comparator class org.apache.cassandra.db.marshal.CompositeType: must define a 
> public static instance field or a public static method 
> getInstance(TypeParser).
> [junit]       at 
> org.apache.cassandra.db.marshal.TypeParser.getRawAbstractType(TypeParser.java:294)
> [junit]       at 
> org.apache.cassandra.db.marshal.TypeParser.getAbstractType(TypeParser.java:268)
> [junit]       at 
> org.apache.cassandra.db.marshal.TypeParser.parse(TypeParser.java:81)
> [junit]       at 
> org.apache.cassandra.db.marshal.CompositeTypeTest.testCompatibility(CompositeTypeTest.java:216)
> {noformat}
> # DefsTest:
> {noformat}
> [junit] Testcase: 
> testUpdateColumnFamilyNoIndexes(org.apache.cassandra.db.DefsTest):  FAILED
> [junit] Should have blown up when you used a different comparator.
> [junit] junit.framework.AssertionFailedError: Should have blown up when you 
> used a different comparator.
> [junit]       at 
> org.apache.cassandra.db.DefsTest.testUpdateColumnFamilyNoIndexes(DefsTest.java:539)
> {noformat}
> # CompactSerializerTest:
> {noformat}
> [junit] null
> [junit] java.lang.ExceptionInInitializerError
> [junit]       at 
> org.apache.cassandra.db.SystemTable.getCurrentLocalNodeId(SystemTable.java:437)
> [junit]       at 
> org.apache.cassandra.utils.NodeId$LocalNodeIdHistory.<init>(NodeId.java:195)
> [junit]       at 
> org.apache.cassandra.utils.NodeId$LocalIds.<clinit>(NodeId.java:43)
> [junit]       at java.lang.Class.forName0(Native Method)
> [junit]       at java.lang.Class.forName(Class.java:169)
> [junit]       at 
> org.apache.cassandra.io.CompactSerializerTest$1DirScanner.scan(CompactSerializerTest.java:96)
> [junit]       at 
> org.apache.cassandra.io.CompactSerializerTest$1DirScanner.scan(CompactSerializerTest.java:87)
> [junit]       at 
> org.apache.cassandra.io.CompactSerializerTest$1DirScanner.scan(CompactSerializerTest.java:87)
> [junit]       at 
> org.apache.cassandra.io.CompactSerializerTest$1DirScanner.scan(CompactSerializerTest.java:87)
> [junit]       at 
> org.apache.cassandra.io.CompactSerializerTest$1DirScanner.scan(CompactSerializerTest.java:87)
> [junit]       at 
> org.apache.cassandra.io.CompactSerializerTest$1DirScanner.scan(CompactSerializerTest.java:87)
> [junit]       at 
> org.apache.cassandra.io.CompactSerializerTest.scanClasspath(CompactSerializerTest.java:129)
> [junit] Caused by: java.lang.NullPointerException
> [junit]       at 
> org.apache.cassandra.config.DatabaseDescriptor.createAllDirectories(DatabaseDescriptor.java:574)
> [junit]       at org.apache.cassandra.db.Table.<clinit>(Table.java:82)
> {noformat}
> There is also some error RemoveSubColumnTest and RemoveSubColumnTest but I'll 
> open a separate ticket for those as they may require a bit more discussion.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to