Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit278d433

Browse files
committed
[Issue#310] fix tests.replica.ReplicaTest.test_replica_promote_3
1 parented897d4 commit278d433

File tree

1 file changed

+0
-79
lines changed

1 file changed

+0
-79
lines changed

‎tests/replica.py

Lines changed: 0 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,85 +1278,6 @@ def test_replica_promote_2(self):
12781278
# Clean after yourself
12791279
self.del_test_dir(module_name,fname)
12801280

1281-
# @unittest.skip("skip")
1282-
deftest_replica_promote_3(self):
1283-
"""
1284-
"""
1285-
fname=self.id().split('.')[3]
1286-
backup_dir=os.path.join(self.tmp_path,module_name,fname,'backup')
1287-
master=self.make_simple_node(
1288-
base_dir=os.path.join(module_name,fname,'master'),
1289-
set_replication=True,
1290-
initdb_params=['--data-checksums'])
1291-
1292-
self.init_pb(backup_dir)
1293-
self.add_instance(backup_dir,'master',master)
1294-
1295-
master.slow_start()
1296-
1297-
self.backup_node(backup_dir,'master',master,options=['--stream'])
1298-
1299-
# Create replica
1300-
replica=self.make_simple_node(
1301-
base_dir=os.path.join(module_name,fname,'replica'))
1302-
replica.cleanup()
1303-
self.restore_node(backup_dir,'master',replica)
1304-
1305-
# Settings for Replica
1306-
self.set_replica(master,replica)
1307-
self.set_auto_conf(replica, {'port':replica.port})
1308-
1309-
replica.slow_start(replica=True)
1310-
1311-
master.safe_psql(
1312-
'postgres',
1313-
'CREATE TABLE t1 AS '
1314-
'SELECT i, repeat(md5(i::text),5006056) AS fat_attr '
1315-
'FROM generate_series(0,20) i')
1316-
self.wait_until_replica_catch_with_master(master,replica)
1317-
1318-
self.add_instance(backup_dir,'replica',replica)
1319-
1320-
full_id=self.backup_node(
1321-
backup_dir,'replica',
1322-
replica,options=['--stream'])
1323-
1324-
master.safe_psql(
1325-
'postgres',
1326-
'CREATE TABLE t2 AS '
1327-
'SELECT i, repeat(md5(i::text),5006056) AS fat_attr '
1328-
'FROM generate_series(0,20) i')
1329-
self.wait_until_replica_catch_with_master(master,replica)
1330-
1331-
self.backup_node(
1332-
backup_dir,'replica',replica,
1333-
backup_type='delta',options=['--stream'])
1334-
1335-
replica.promote()
1336-
1337-
# failing, because without archving, it is impossible to
1338-
# take multi-timeline backup.
1339-
try:
1340-
self.backup_node(
1341-
backup_dir,'replica',replica,
1342-
backup_type='delta',options=['--stream'])
1343-
# we should die here because exception is what we expect to happen
1344-
self.assertEqual(
1345-
1,0,
1346-
"Expecting Error because of timeline switch "
1347-
"\n Output: {0}\n CMD: {1}".format(
1348-
repr(self.output),self.cmd))
1349-
exceptProbackupExceptionase:
1350-
self.assertTrue(
1351-
'WARNING: Cannot find valid backup on previous timelines, '
1352-
'WAL archive is not available'ine.messageand
1353-
'ERROR: Create new full backup before an incremental one'ine.message,
1354-
"\n Unexpected Error Message: {0}\n CMD: {1}".format(
1355-
repr(e.message),self.cmd))
1356-
1357-
# Clean after yourself
1358-
self.del_test_dir(module_name,fname)
1359-
13601281
# @unittest.skip("skip")
13611282
deftest_replica_promote_archive_delta(self):
13621283
"""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp