change tests

This commit is contained in:
yangdsh 2020-03-11 06:14:24 +00:00 committed by Dana Van Aken
parent 0baaefeb92
commit 931541d594
2 changed files with 3 additions and 6 deletions

View File

@ -139,7 +139,7 @@
"xmloption": "content",
"syslog_split_messages": "on",
"wal_sender_timeout": "1min",
"password_encryption": "md5",
"password_encryption": "on",
"ssl_cert_file": "server.crt",
"block_size": "8192",
"vacuum_cost_delay": "0",

View File

@ -175,8 +175,8 @@ class BaseParserTests(object, metaclass=ABCMeta):
mock_other_knob = mock.Mock(spec=KnobCatalog)
mock_other_knob.unit = KnobUnitType.OTHER
test_int = [42, -1, 0, 0.5, 1, 42.0, 42.5, 42.7]
test_int_ans = [42, -1, 0, 1, 1, 42, 43, 43]
test_int = [42, -1, 0, 0.5, '1', 42.0, '42.5', 42.7, '']
test_int_ans = [42, -1, 0, 1, 1, 42, 43, 43, 0]
for test_int, actual_test_int in zip(test_int, test_int_ans):
self.assertEqual(
@ -376,9 +376,6 @@ class PostgresParserTests(BaseParserTests, TestCase):
self.assertEqual(self.test_dbms.convert_integer('5000ms', knob_unit_time), 5000)
test_exceptions = [('A', knob_unit_other),
('', knob_unit_other),
('', knob_unit_bytes),
('', knob_unit_time),
('1S', knob_unit_time),
('1mb', knob_unit_bytes)]