提交 bbb723fb 编写于 作者: E Eks OU 提交者: dinglei

[RIP-10]Optimize the test case for DefaultMessageStore.CleanCommitLogService...

[RIP-10]Optimize the test case for DefaultMessageStore.CleanCommitLogService and DefaultMessageStore.CleanConsumeQueueService (#939)

[RIP-10]Optimize the test case for DefaultMessageStore.CleanCommitLogService and DefaultMessageStore.CleanConsumeQueueService
上级 27622c58
......@@ -107,7 +107,7 @@ public class DefaultMessageStoreCleanFilesTest {
@Test
public void testDeleteExpiredFilesBySpaceFull() throws Exception {
String deleteWhen = "04";
// the min value of diskMaxUsedSpaceRatio. make sure disk space usage is greater than 10%
// the min value of diskMaxUsedSpaceRatio.
int diskMaxUsedSpaceRatio = 1;
// used to ensure that automatic file deletion is not triggered
double diskSpaceCleanForciblyRatio = 0.999D;
......@@ -146,7 +146,7 @@ public class DefaultMessageStoreCleanFilesTest {
@Test
public void testDeleteFilesImmediatelyBySpaceFull() throws Exception {
String deleteWhen = "04";
// the min value of diskMaxUsedSpaceRatio. make sure disk space usage is greater than 10%
// the min value of diskMaxUsedSpaceRatio.
int diskMaxUsedSpaceRatio = 1;
// make sure to trigger the automatic file deletion feature
double diskSpaceCleanForciblyRatio = 0.01D;
......@@ -304,8 +304,9 @@ public class DefaultMessageStoreCleanFilesTest {
assertTrue(result != null && result.isOk());
}
// wait for build consumer queue completion
Thread.sleep(100);
StoreTestUtil.waitCommitLogReput(messageStore);
StoreTestUtil.flushConsumeQueue(messageStore);
StoreTestUtil.flushConsumeIndex(messageStore);
}
private void expireFiles(MappedFileQueue commitLogQueue, int expireCount) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册