Package org.h2.store
Class RecoverTester
java.lang.Object
org.h2.store.RecoverTester
- All Implemented Interfaces:
Recorder
A tool that simulates a crash while writing to the database, and then
verifies the database doesn't get corrupt.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final RecoverTester
private final long
private String
private int
private boolean
private int
private int
Fields inherited from interface org.h2.store.fs.Recorder
CREATE_NEW_FILE, CREATE_TEMP_FILE, DELETE, OPEN_OUTPUT_STREAM, RENAME, TRUNCATE, WRITE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Initialize the recover test.void
Record the method.void
setTestEvery
(int testEvery) private void
testDatabase
(String fileName, PrintWriter out)
-
Field Details
-
instance
-
testDatabase
-
writeCount
private int writeCount -
testEvery
private int testEvery -
maxFileSize
private final long maxFileSize -
verifyCount
private int verifyCount -
knownErrors
-
testing
private volatile boolean testing
-
-
Constructor Details
-
RecoverTester
public RecoverTester()
-
-
Method Details
-
init
Initialize the recover test.- Parameters:
recoverTest
- the value of the recover test parameter
-
log
Description copied from interface:Recorder
Record the method. -
testDatabase
-
setTestEvery
public void setTestEvery(int testEvery)
-