コード例 #1
0
ファイル: test_gpactivatestandby.py プロジェクト: 50wu/gpdb
 def test_gpactivatestandby_on_same_host(self):
     ''' Doesn't work due to STO-374'''
     gputil.install_standby(new_stdby_host='localhost')
     initstdby = GpinitStandby()
     gpact_stdby = GpactivateStandby()
     self.mdd = gpact_stdby.get_standby_dd()
     self.port = gpact_stdby.get_standby_port()
     self.standby_pid = gpact_stdby.get_standby_pid('localhost', self.port, self.mdd)
     PSQL.run_sql_file(local_path('create_tables.sql'), dbname = self.db_name)
     self.assertTrue(gpact_stdby.activate())
     self.assertTrue(gpact_stdby.verify_gpactivatestandby(self.standby_pid, 'localhost', self.port, self.mdd))
     gputil.failback_to_original_master(self.origin_mdd,socket.gethostname(),self.mdd,self.port)
コード例 #2
0
ファイル: test_gpactivatestandby.py プロジェクト: 50wu/gpdb
 def test_gpactivatestandby_on_new_host(self):
     gputil.install_standby()
     initstdby = GpinitStandby()
     gpact_stdby = GpactivateStandby()
     self.mdd = gpact_stdby.get_standby_dd()
     self.host = initstdby.get_standbyhost()
     self.port = gpact_stdby.get_standby_port()
     self.standby_pid = gpact_stdby.get_standby_pid(self.host, self.port, self.mdd)
     PSQL.run_sql_file(local_path('create_tables.sql'), dbname = self.db_name)
     self.assertTrue(gpact_stdby.activate())
     self.assertTrue(gpact_stdby.verify_gpactivatestandby(self.standby_pid, self.host, self.port, self.mdd)) 
     gputil.failback_to_original_master(self.origin_mdd,self.host,self.mdd,self.port) 
コード例 #3
0
 def test_gpactivatestandby_on_same_host(self):
     ''' Doesn't work due to STO-374'''
     gputil.install_standby(new_stdby_host='localhost')
     initstdby = GpinitStandby()
     gpact_stdby = GpactivateStandby()
     self.mdd = gpact_stdby.get_standby_dd()
     self.port = gpact_stdby.get_standby_port()
     self.standby_pid = gpact_stdby.get_standby_pid('localhost', self.port, self.mdd)
     PSQL.run_sql_file(local_path('create_tables.sql'), dbname = self.db_name)
     self.assertTrue(gpact_stdby.activate())
     self.assertTrue(gpact_stdby.verify_gpactivatestandby(self.standby_pid, 'localhost', self.port, self.mdd))
     gputil.failback_to_original_master(self.origin_mdd,socket.gethostname(),self.mdd,self.port)
コード例 #4
0
 def test_gpactivatestandby_on_new_host(self):
     gputil.install_standby()
     initstdby = GpinitStandby()
     gpact_stdby = GpactivateStandby()
     self.mdd = gpact_stdby.get_standby_dd()
     self.host = initstdby.get_standbyhost()
     self.port = gpact_stdby.get_standby_port()
     self.standby_pid = gpact_stdby.get_standby_pid(self.host, self.port, self.mdd)
     PSQL.run_sql_file(local_path('create_tables.sql'), dbname = self.db_name)
     self.assertTrue(gpact_stdby.activate())
     self.assertTrue(gpact_stdby.verify_gpactivatestandby(self.standby_pid, self.host, self.port, self.mdd)) 
     gputil.failback_to_original_master(self.origin_mdd,self.host,self.mdd,self.port) 
コード例 #5
0
ファイル: test_gpactivatestandby.py プロジェクト: 50wu/gpdb
 def test_gpactivatestandby_new_host_with_filespace(self):
     from mpp.lib.gpfilespace import Gpfilespace
     gpfile = Gpfilespace()
     gpfile.create_filespace('fs_walrepl_a')
     PSQL.run_sql_file(local_path('filespace.sql'), dbname= self.db_name)
     gputil.install_standby()
     initstdby = GpinitStandby()
     gpact_stdby = GpactivateStandby()
     self.mdd = gpact_stdby.get_standby_dd()
     self.host = initstdby.get_standbyhost()
     self.port = gpact_stdby.get_standby_port()
     self.standby_pid = gpact_stdby.get_standby_pid(self.host, self.port, self.mdd)
     PSQL.run_sql_file(local_path('create_tables.sql'), dbname = self.db_name)
     self.assertTrue(gpact_stdby.activate())
     self.assertTrue(gpact_stdby.verify_gpactivatestandby(self.standby_pid, self.host, self.port, self.mdd)) 
     gputil.failback_to_original_master(self.origin_mdd,self.host,self.mdd,self.port)
コード例 #6
0
 def test_gpactivatestandby_new_host_with_filespace(self):
     #from mpp.lib.gpfilespace import Gpfilespace
     #gpfile = Gpfilespace()
     #gpfile.create_filespace('fs_walrepl_a')
     #PSQL.run_sql_file(local_path('filespace.sql'), dbname= self.db_name)
     gputil.install_standby()
     initstdby = GpinitStandby()
     gpact_stdby = GpactivateStandby()
     self.mdd = gpact_stdby.get_standby_dd()
     self.host = initstdby.get_standbyhost()
     self.port = gpact_stdby.get_standby_port()
     self.standby_pid = gpact_stdby.get_standby_pid(self.host, self.port, self.mdd)
     PSQL.run_sql_file(local_path('create_tables.sql'), dbname = self.db_name)
     self.assertTrue(gpact_stdby.activate())
     self.assertTrue(gpact_stdby.verify_gpactivatestandby(self.standby_pid, self.host, self.port, self.mdd)) 
     gputil.failback_to_original_master(self.origin_mdd,self.host,self.mdd,self.port)