2209 |
03 May 06 |
nicklas |
1 |
/* |
2209 |
03 May 06 |
nicklas |
$Id$ |
2209 |
03 May 06 |
nicklas |
3 |
|
4889 |
06 Apr 09 |
nicklas |
Copyright (C) 2006 Jari Häkkinen, Nicklas Nordborg |
2209 |
03 May 06 |
nicklas |
5 |
|
2304 |
22 May 06 |
jari |
This file is part of BASE - BioArray Software Environment. |
2304 |
22 May 06 |
jari |
Available at http://base.thep.lu.se/ |
2209 |
03 May 06 |
nicklas |
8 |
|
2209 |
03 May 06 |
nicklas |
BASE is free software; you can redistribute it and/or |
2209 |
03 May 06 |
nicklas |
modify it under the terms of the GNU General Public License |
4480 |
05 Sep 08 |
jari |
as published by the Free Software Foundation; either version 3 |
2209 |
03 May 06 |
nicklas |
of the License, or (at your option) any later version. |
2209 |
03 May 06 |
nicklas |
13 |
|
2209 |
03 May 06 |
nicklas |
BASE is distributed in the hope that it will be useful, |
2209 |
03 May 06 |
nicklas |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
2209 |
03 May 06 |
nicklas |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2209 |
03 May 06 |
nicklas |
GNU General Public License for more details. |
2209 |
03 May 06 |
nicklas |
18 |
|
2209 |
03 May 06 |
nicklas |
You should have received a copy of the GNU General Public License |
4514 |
11 Sep 08 |
jari |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
2209 |
03 May 06 |
nicklas |
21 |
*/ |
2209 |
03 May 06 |
nicklas |
22 |
import net.sf.basedb.core.HibernateUtil; |
2209 |
03 May 06 |
nicklas |
23 |
|
2209 |
03 May 06 |
nicklas |
24 |
public class TestUpdateIndexes |
2209 |
03 May 06 |
nicklas |
25 |
{ |
2209 |
03 May 06 |
nicklas |
26 |
|
2209 |
03 May 06 |
nicklas |
27 |
static boolean ok = true; |
2209 |
03 May 06 |
nicklas |
28 |
public static void main(String[] args) |
2209 |
03 May 06 |
nicklas |
29 |
{ |
2209 |
03 May 06 |
nicklas |
30 |
TestUtil.checkArgs(args); |
2209 |
03 May 06 |
nicklas |
31 |
TestUtil.begin(); |
2209 |
03 May 06 |
nicklas |
32 |
ok = test_all(); |
2209 |
03 May 06 |
nicklas |
33 |
TestUtil.stop(); |
2209 |
03 May 06 |
nicklas |
34 |
} |
2209 |
03 May 06 |
nicklas |
35 |
|
2209 |
03 May 06 |
nicklas |
36 |
static boolean test_all() |
2209 |
03 May 06 |
nicklas |
37 |
{ |
2209 |
03 May 06 |
nicklas |
38 |
write("++Testing update indexes"); |
2209 |
03 May 06 |
nicklas |
39 |
|
2209 |
03 May 06 |
nicklas |
40 |
try |
2209 |
03 May 06 |
nicklas |
41 |
{ |
2209 |
03 May 06 |
nicklas |
42 |
HibernateUtil.dbIndexes(!TestUtil.getSilent(), TestUtil.getSilent(), false, true); |
2209 |
03 May 06 |
nicklas |
43 |
} |
2209 |
03 May 06 |
nicklas |
44 |
catch (Throwable t) |
2209 |
03 May 06 |
nicklas |
45 |
{ |
2209 |
03 May 06 |
nicklas |
46 |
t.printStackTrace(); |
2209 |
03 May 06 |
nicklas |
47 |
ok = false; |
2209 |
03 May 06 |
nicklas |
48 |
} |
2209 |
03 May 06 |
nicklas |
49 |
|
2209 |
03 May 06 |
nicklas |
50 |
write("++Testing update indexes "+(ok ? "OK" : "Failed")+"\n"); |
2209 |
03 May 06 |
nicklas |
51 |
return ok; |
2209 |
03 May 06 |
nicklas |
52 |
} |
2209 |
03 May 06 |
nicklas |
53 |
|
2209 |
03 May 06 |
nicklas |
54 |
|
2209 |
03 May 06 |
nicklas |
55 |
static void write(String message) |
2209 |
03 May 06 |
nicklas |
56 |
{ |
2209 |
03 May 06 |
nicklas |
57 |
System.out.println(message); |
2209 |
03 May 06 |
nicklas |
58 |
} |
2209 |
03 May 06 |
nicklas |
59 |
|
2209 |
03 May 06 |
nicklas |
60 |
|
2209 |
03 May 06 |
nicklas |
61 |
} |
2209 |
03 May 06 |
nicklas |
62 |
|