org.hsqldb.test
Class TestDbBackup
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.hsqldb.test.TestDbBackup
-
- All Implemented Interfaces:
- junit.framework.Test
public class TestDbBackup extends junit.framework.TestCase
-
-
Constructor Summary
Constructors Constructor and Description TestDbBackup()TestDbBackup(java.lang.String s)Accommodate JUnit's test-runner conventions.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static voidmain(java.lang.String[] sa)This method allows to easily run this unit test independent of the other unit tests, and without dealing with Ant or unrelated test suites.voidmainBackupAndRestore(java.lang.String baseTarName)voidonlineBackupAndRestore(java.lang.String baseTarName, boolean populate, boolean compress, java.lang.String restoreDest)static junit.framework.Testsuite()voidtestAutoNaming()Test that correct DB names are generated when user supplies just a directory.voidtestBasicBackup()voidtestGzip()voidtestMainAlreadyOpen()voidtestOnlineBackup()Test all forms of online backups with explicit filenames.voidtestSanity()voidtestTarFileNames()Test that bad explicit filenames are rejected for onilne backups.-
Methods inherited from class junit.framework.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, setName, toString
-
-
-
-
Constructor Detail
-
TestDbBackup
public TestDbBackup() throws java.io.IOException, java.sql.SQLException- Throws:
java.io.IOExceptionjava.sql.SQLException
-
TestDbBackup
public TestDbBackup(java.lang.String s) throws java.io.IOException, java.sql.SQLExceptionAccommodate JUnit's test-runner conventions.- Throws:
java.io.IOExceptionjava.sql.SQLException
-
-
Method Detail
-
main
public static void main(java.lang.String[] sa)
This method allows to easily run this unit test independent of the other unit tests, and without dealing with Ant or unrelated test suites.
-
testSanity
public void testSanity() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
testBasicBackup
public void testBasicBackup() throws java.sql.SQLException, java.io.IOException, TarMalformatException- Throws:
java.sql.SQLExceptionjava.io.IOExceptionTarMalformatException
-
testGzip
public void testGzip() throws java.sql.SQLException, java.io.IOException, TarMalformatException- Throws:
java.sql.SQLExceptionjava.io.IOExceptionTarMalformatException
-
testOnlineBackup
public void testOnlineBackup() throws java.sql.SQLException, java.io.IOException, TarMalformatExceptionTest all forms of online backups with explicit filenames.- Throws:
java.sql.SQLExceptionjava.io.IOExceptionTarMalformatException
-
onlineBackupAndRestore
public void onlineBackupAndRestore(java.lang.String baseTarName, boolean populate, boolean compress, java.lang.String restoreDest) throws java.sql.SQLException, java.io.IOException, TarMalformatException- Throws:
java.sql.SQLExceptionjava.io.IOExceptionTarMalformatException
-
mainBackupAndRestore
public void mainBackupAndRestore(java.lang.String baseTarName) throws java.sql.SQLException, java.io.IOException, TarMalformatException- Throws:
java.sql.SQLExceptionjava.io.IOExceptionTarMalformatException
-
testMainAlreadyOpen
public void testMainAlreadyOpen() throws java.sql.SQLException, java.io.IOException, TarMalformatException- Throws:
java.sql.SQLExceptionjava.io.IOExceptionTarMalformatException
-
testTarFileNames
public void testTarFileNames() throws java.sql.SQLException, java.io.IOException, TarMalformatExceptionTest that bad explicit filenames are rejected for onilne backups.- Throws:
java.sql.SQLExceptionjava.io.IOExceptionTarMalformatException
-
testAutoNaming
public void testAutoNaming() throws java.sql.SQLException, java.io.IOException, TarMalformatExceptionTest that correct DB names are generated when user supplies just a directory. N.b. This test may not work right if tests are run at midnight. This limitation will be removed once we can update the FilenameFilters with Java 4's java.util.regex.- Throws:
java.sql.SQLExceptionjava.io.IOExceptionTarMalformatException
-
suite
public static junit.framework.Test suite() throws java.io.IOException, java.sql.SQLException- Throws:
java.io.IOExceptionjava.sql.SQLException
-
-
DataMelt 3.0 © DataMelt by jWork.ORG