在編譯卡桑德拉單元測試用例我一直在一個錯誤。其中一項測試有時會超時。雖然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