KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derbyTesting > functionTests > tests > store > dropcrash2


1 /*
2
3    Derby - Class org.apache.derbyTesting.functionTests.harness.procedure
4
5    Licensed to the Apache Software Foundation (ASF) under one or more
6    contributor license agreements. See the NOTICE file distributed with
7    this work for additional information regarding copyright ownership.
8    The ASF licenses this file to You under the Apache License, Version 2.0
9    (the "License"); you may not use this file except in compliance with
10    the License. You may obtain a copy of the License at
11
12       http://www.apache.org/licenses/LICENSE-2.0
13
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19
20  */

21
22 package org.apache.derbyTesting.functionTests.tests.store;
23
24 import org.apache.derby.iapi.services.sanity.SanityManager;
25
26 import java.sql.CallableStatement JavaDoc;
27 import java.sql.Connection JavaDoc;
28 import java.sql.PreparedStatement JavaDoc;
29 import java.sql.ResultSet JavaDoc;
30 import java.sql.SQLException JavaDoc;
31 import java.sql.Statement JavaDoc;
32
33 import org.apache.derby.tools.ij;
34
35
36 public class dropcrash2 extends dropcrash
37 {
38     boolean verbose = false;
39
40     public dropcrash2()
41     {
42     }
43     
44     public void testList(Connection JavaDoc conn)
45         throws SQLException JavaDoc
46     {
47         // make sure after redo phase that all tables are consistent, without
48
// bug fix one of the tables will get a container not found exception.
49
beginTest(conn, "check consistency of all tables");
50         checkAllConsistency(conn);
51         endTest(conn, "check consistency of all tables");
52     }
53
54     public static void main(String JavaDoc[] argv)
55         throws Throwable JavaDoc
56     {
57         dropcrash2 test = new dropcrash2();
58
59         ij.getPropertyArg(argv);
60         Connection JavaDoc conn = ij.startJBMS();
61         conn.setAutoCommit(false);
62
63         try
64         {
65             test.testList(conn);
66         }
67         catch (SQLException JavaDoc sqle)
68         {
69             org.apache.derby.tools.JDBCDisplayUtil.ShowSQLException(
70                 System.out, sqle);
71             sqle.printStackTrace(System.out);
72         }
73     }
74 }
75
Popular Tags