Fix CommitLogStressTest timeout

Patch by jmckenzie; reviewed by blambov for CASSANDRA-12207
This commit is contained in:
Josh McKenzie 2016-07-22 12:34:52 -04:00
parent 5e111e64d0
commit ed9014818c
1 changed files with 3 additions and 3 deletions

View File

@ -130,12 +130,12 @@ public class CommitLogStressTest
SchemaLoader.loadSchema();
SchemaLoader.schemaDefinition(""); // leave def. blank to maintain old behaviour
CommitLog.instance.stopUnsafe(true);
}
@Before
public void cleanDir() throws IOException
{
CommitLog.instance.stopUnsafe(true);
File dir = new File(location);
if (dir.isDirectory())
{
@ -208,9 +208,9 @@ public class CommitLogStressTest
for (CommitLogSync sync : CommitLogSync.values())
{
DatabaseDescriptor.setCommitLogSync(sync);
CommitLog commitLog = new CommitLog(CommitLogArchiver.disabled()).start();
// Need to enable reserve segment creation as close to test start as possible to minimize race
CommitLog commitLog = new CommitLog(CommitLogArchiver.disabled());
commitLog.segmentManager.enableReserveSegmentCreation();
commitLog.start();
testLog(commitLog);
assert !failed;
}