Ejemplo n.º 1
0
class Londiste2Test(unittest.TestCase):
    "tests that pgbench is runnable"
    def setUp(self):
        from PGDatabase import PGDatabase
        self.db = PGDatabase('pgbtest', port='5432')
        self.db2 = PGDatabase('pgbtest2', port='5432')
        self.londiste = Londiste2(self.db, self.db2)
    def tearDown(self):
        pass
    def test_replica_setup(self):
        from PGBench import PGBench
        self.db.createdb()
        self.pgbench = PGBench(2, db=self.db)
        self.pgbench.preparedb()
        self.db2.createdb()
        self.db2.copy_schema_from(self.db)
        if 0: # if londiste was installed on source
            self.db2.cleanup_londiste_provider()
    def test_create_ticker_ini(self):
        self.londiste.create_ticker_ini()
    def test_install_ticker(self):
        self.londiste.install_ticker()
    def test_start_ticker(self):
        self.londiste.start_ticker()
    def test_create_provider_ini(self):
        self.londiste.create_provider_ini()
    def test_create_subscriber_ini(self):
        self.londiste.create_subscriber_ini()
    def test_install_londiste_on_provider(self):
        self.londiste.install_londiste_on_provider()
    def test_install_londiste_on_subscriber(self):
        self.londiste.install_londiste_on_subscriber()
    def test_start_londiste_replay(self):
        self.londiste.start_londiste_replay()
    def test_add_tables_on_provider(self):
        self.londiste.add_tables_on_provider(['--all'])
    def test_add_tables_on_subscriber(self):
        self.londiste.add_tables_on_subscriber(['--all'])
    def test_wait_for_subscription(self):
        self.londiste.wait_for_subscription()
    def test_check_lag(self):
        self.londiste.check_lag()
    def test_check_data(self):
        self.londiste.check_data()
    def test_(self):
        self.londiste.x()
    def test_(self):
        self.londiste.x()