在编译卡桑德拉单元测试用例我一直在一个错误。其中一项测试有时会超时。虽然https://issues.apache.org/jira/browse/CASSANDRA-8981指出此问题已在2.1.5版中得到解决,但我仍然遇到此问题。使用jdk1.8从源代码构建cassandra 2.1.5。以下是详细内容:卡桑德拉IndexSummaryManagerTest单元测试用例超时错误
[junit] Testsuite: org.apache.cassandra.io.sstable.IndexSummaryManagerTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec
[junit]
[junit] Testcase: org.apache.cassandra.io.sstable.IndexSummaryManagerTest:testCompactionRace: Caused an ERROR
[junit] Timeout occurred. Please note the time in the report does not reflect the time until the timeout.
[junit] junit.framework.AssertionFailedError: Timeout occurred. Please note the time in the report does not reflect the time until the timeout.
[junit] at java.lang.Thread.run(Thread.java:745)
[junit]
[junit]
[junit] Test org.apache.cassandra.io.sstable.IndexSummaryManagerTest FAILED (timeout)
[junit] Testsuite: org.apache.cassandra.io.sstable.IndexSummaryTest
[junit] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.193 sec
非常感谢你的帮助。我一直在增加超时时间,测试终于成功了,测试成功需要6分钟。我在运行在我的mac上的虚拟机上的docker中运行它。正如你所建议的那样,我将加入IRC频道并从那里获得投入。 – Sandeep
此外,我已经注意到这些行在日志中重复测试执行时间的主要部分: DEBUG [pool-3-thread-1] 2015-05-19 18:16:07,136完成索引摘要的大小调整;当前使用的近似内存:0.09203243255615234 MB DEBUG [pool-3-thread-2] 2015-05-19 18:16:07,137完成索引摘要的大小调整;当前使用的近似内存:0.09203243255615234 MB DEBUG [pool-3-thread-1] 2015-05-19 18:16:07,137开始重新分配65个sstables的索引摘要,内存池大小为7 MB;使用的当前间隔是0.09203243255615234 MB – Sandeep