1 24 25 package org.objectweb.cjdbc.scenario.raidb1.recoverylog; 26 27 import java.sql.Connection ; 28 import java.util.ArrayList ; 29 30 import org.objectweb.cjdbc.common.shared.BackendState; 31 import org.objectweb.cjdbc.scenario.templates.Raidb1RecoveryTemplate; 32 import org.objectweb.cjdbc.scenario.tools.ScenarioUtility; 33 import org.objectweb.cjdbc.scenario.tools.testlet.UpdateTestLet; 34 35 41 public class PersistentBackendStateScenario extends Raidb1RecoveryTemplate 42 { 43 48 public void testPersistence() throws Exception 49 { 50 UpdateTestLet let = new UpdateTestLet(getCJDBCConnection()); 51 let.execute(); 52 mainVdb.disableAllBackendsWithCheckpoint("niko"); 53 Connection con = getHypersonicConnection(9003); 54 ArrayList result = ScenarioUtility.getSingleQueryResult( 55 "select * from backendTable", con); 56 for (int i = 0; i < result.size(); i++) 57 assertEquals(((ArrayList ) result.get(i)).get(2), String 58 .valueOf(BackendState.DISABLED)); 59 } 60 } | Popular Tags |