Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derbyTesting.unitTests.store
Class T_RecoverFullLog  view T_RecoverFullLog download T_RecoverFullLog.java

java.lang.Object
  extended byorg.apache.derbyTesting.unitTests.harness.T_Generic
      extended byorg.apache.derbyTesting.unitTests.store.T_RecoverFullLog
All Implemented Interfaces:
org.apache.derby.iapi.services.monitor.ModuleControl, org.apache.derbyTesting.unitTests.harness.UnitTest

public class T_RecoverFullLog
extends org.apache.derbyTesting.unitTests.harness.T_Generic

A implementation unit test for log full condition To run, create a derby.properties file in a new directory with the contents derby.module.test.recoverFullLog=org.apache.derbyTesting.unitTests.store.T_RecoverFullLog Execute in order java -DTestFillLog=true org.apache.derbyTesting.unitTests.harness.UnitTestMain java -DTestLogSwitchFail=true org.apache.derbyTesting.unitTests.harness.UnitTestMain java -DTestFullRecoveryFail=true org.apache.derbyTesting.unitTests.harness.UnitTestMain (run this serveral times, this simulate recovery running out of log) java -DTestFullRecover=true org.apache.derbyTesting.unitTests.harness.UnitTestMain


Field Summary
(package private)  org.apache.derby.iapi.services.context.ContextService contextService
           
(package private)  org.apache.derby.iapi.store.raw.RawStoreFactory factory
           
private  boolean fillLog
           
private  java.io.RandomAccessFile infofile
           
private static java.lang.String infoPath
           
(package private)  org.apache.derby.iapi.services.locks.LockFactory lf
           
private  boolean logSwitchFail
           
(package private) static java.lang.String REC_001
           
(package private) static java.lang.String REC_002
           
(package private) static java.lang.String REC_003
           
(package private) static java.lang.String REC_004
           
(package private) static java.lang.String REC_005
           
(package private) static java.lang.String REC_006
           
(package private) static java.lang.String REC_UNDO
           
private  boolean recover
           
private  boolean recoveryFail
           
(package private) static java.lang.String SP1
           
(package private) static java.lang.String SP2
           
(package private)  T_Util t_util
           
private  java.lang.String TEST_FILL_LOG
           
private static java.lang.String TEST_FULL_LOG_INFO
           
private  java.lang.String TEST_FULL_RECOVER
           
private  java.lang.String TEST_FULL_RECOVER_FAIL
           
private  java.lang.String TEST_LOG_SWITCH_FAIL
           
private static java.lang.String testService
           
 
Fields inherited from class org.apache.derbyTesting.unitTests.harness.T_Generic
out, shortModuleToTestName, startParams
 
Constructor Summary
T_RecoverFullLog()
           
 
Method Summary
protected  void checkRecovery()
           
protected  void fillUpLog()
           
private  long find(long inkey)
           
private  void getConfig()
           
 java.lang.String getModuleToTestProtocolName()
          Get the name of the protocol for the module to test.
private  long key(int test, int param)
           
protected  void logSwitchFail1()
           
protected  void logSwitchFail2()
           
private  void register(long key, long value)
           
 void runTests()
          See T_Recovery for the general testing frame work
protected  void testBasic(int testNumber)
           
 
Methods inherited from class org.apache.derbyTesting.unitTests.harness.T_Generic
boot, Execute, FAIL, PASS, REPORT, stop, UnitTestDuration, UnitTestType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

testService

private static final java.lang.String testService
See Also:
Constant Field Values

REC_001

static final java.lang.String REC_001
See Also:
Constant Field Values

REC_002

static final java.lang.String REC_002
See Also:
Constant Field Values

REC_003

static final java.lang.String REC_003
See Also:
Constant Field Values

REC_004

static final java.lang.String REC_004
See Also:
Constant Field Values

REC_005

static final java.lang.String REC_005
See Also:
Constant Field Values

REC_006

static final java.lang.String REC_006
See Also:
Constant Field Values

REC_UNDO

static final java.lang.String REC_UNDO
See Also:
Constant Field Values

SP1

static final java.lang.String SP1
See Also:
Constant Field Values

SP2

static final java.lang.String SP2
See Also:
Constant Field Values

infofile

private java.io.RandomAccessFile infofile

infoPath

private static final java.lang.String infoPath
See Also:
Constant Field Values

fillLog

private boolean fillLog

recoveryFail

private boolean recoveryFail

logSwitchFail

private boolean logSwitchFail

recover

private boolean recover

TEST_FILL_LOG

private java.lang.String TEST_FILL_LOG

TEST_FULL_RECOVER_FAIL

private java.lang.String TEST_FULL_RECOVER_FAIL

TEST_LOG_SWITCH_FAIL

private java.lang.String TEST_LOG_SWITCH_FAIL

TEST_FULL_RECOVER

private java.lang.String TEST_FULL_RECOVER

TEST_FULL_LOG_INFO

private static final java.lang.String TEST_FULL_LOG_INFO
See Also:
Constant Field Values

factory

org.apache.derby.iapi.store.raw.RawStoreFactory factory

lf

org.apache.derby.iapi.services.locks.LockFactory lf

contextService

org.apache.derby.iapi.services.context.ContextService contextService

t_util

T_Util t_util
Constructor Detail

T_RecoverFullLog

public T_RecoverFullLog()
Method Detail

getModuleToTestProtocolName

public java.lang.String getModuleToTestProtocolName()
Description copied from class: org.apache.derbyTesting.unitTests.harness.T_Generic
Get the name of the protocol for the module to test. This is the 'factory.MODULE' variable. 'moduleName' to the name of the module to test.


getConfig

private void getConfig()

runTests

public void runTests()
              throws org.apache.derbyTesting.unitTests.harness.T_Fail
See T_Recovery for the general testing frame work


find

private long find(long inkey)

key

private long key(int test,
                 int param)

register

private void register(long key,
                      long value)
               throws org.apache.derbyTesting.unitTests.harness.T_Fail

testBasic

protected void testBasic(int testNumber)
                  throws org.apache.derbyTesting.unitTests.harness.T_Fail,
                         org.apache.derby.iapi.error.StandardException

fillUpLog

protected void fillUpLog()
                  throws org.apache.derbyTesting.unitTests.harness.T_Fail,
                         org.apache.derby.iapi.error.StandardException

logSwitchFail1

protected void logSwitchFail1()
                       throws org.apache.derbyTesting.unitTests.harness.T_Fail,
                              org.apache.derby.iapi.error.StandardException

logSwitchFail2

protected void logSwitchFail2()
                       throws org.apache.derbyTesting.unitTests.harness.T_Fail,
                              org.apache.derby.iapi.error.StandardException

checkRecovery

protected void checkRecovery()
                      throws org.apache.derbyTesting.unitTests.harness.T_Fail,
                             org.apache.derby.iapi.error.StandardException