fix minor typo (#1991)

close #1990
This commit is contained in:
Florian Bütler
2021-07-02 08:27:17 +02:00
committed by GitHub
parent 77382e75dc
commit e2d8a7d086
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1002,7 +1002,7 @@ class Ha(object):
else:
return self.enforce_master_role(
'no action. I am ({0}) the leader with the lock'.format(self.state_handler.name),
'promoted self to leader because i had the session lock'
'promoted self to leader because I had the session lock'
)
else:
# Either there is no connection to DCS or someone else acquired the lock
+2 -2
View File
@@ -300,7 +300,7 @@ class TestHa(PostgresInit):
self.p.is_healthy = true
self.ha.has_lock = true
self.p.controldata = lambda: {'Database cluster state': 'in production', 'Database system identifier': SYSID}
self.assertEqual(self.ha.run_cycle(), 'promoted self to leader because i had the session lock')
self.assertEqual(self.ha.run_cycle(), 'promoted self to leader because I had the session lock')
@patch('psycopg2.connect', psycopg2_connect)
def test_acquire_lock_as_master(self):
@@ -354,7 +354,7 @@ class TestHa(PostgresInit):
self.ha.cluster.is_unlocked = false
self.ha.has_lock = true
self.p.is_leader = false
self.assertEqual(self.ha.run_cycle(), 'promoted self to leader because i had the session lock')
self.assertEqual(self.ha.run_cycle(), 'promoted self to leader because I had the session lock')
def test_promote_without_watchdog(self):
self.ha.cluster.is_unlocked = false