#2404 add missing test and revert some name changes
This commit is contained in:
@@ -158,7 +158,7 @@ green_ier_blocked: -0.001
|
|||||||
# Patching / Reset durations
|
# Patching / Reset durations
|
||||||
os_patching_duration: 5 # The time taken to patch the OS
|
os_patching_duration: 5 # The time taken to patch the OS
|
||||||
node_reset_duration: 5 # The time taken to reset a node (hardware)
|
node_reset_duration: 5 # The time taken to reset a node (hardware)
|
||||||
service_fixing_duration: 5 # The time taken to patch a service
|
service_patching_duration: 5 # The time taken to patch a service
|
||||||
file_system_repairing_limit: 5 # The time take to repair the file system
|
file_system_repairing_limit: 5 # The time take to repair the file system
|
||||||
file_system_restoring_limit: 5 # The time take to restore the file system
|
file_system_restoring_limit: 5 # The time take to restore the file system
|
||||||
file_system_scanning_limit: 5 # The time taken to scan the file system
|
file_system_scanning_limit: 5 # The time taken to scan the file system
|
||||||
|
|||||||
@@ -5634,7 +5634,7 @@
|
|||||||
"green_ier_blocked": -0.001,
|
"green_ier_blocked": -0.001,
|
||||||
"os_patching_duration": 5,
|
"os_patching_duration": 5,
|
||||||
"node_reset_duration": 5,
|
"node_reset_duration": 5,
|
||||||
"service_fixing_duration": 5,
|
"service_patching_duration": 5,
|
||||||
"file_system_repairing_limit": 5,
|
"file_system_repairing_limit": 5,
|
||||||
"file_system_restoring_limit": 5,
|
"file_system_restoring_limit": 5,
|
||||||
"file_system_scanning_limit": 5
|
"file_system_scanning_limit": 5
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ class Application(IOSoftware):
|
|||||||
"""The main application loop."""
|
"""The main application loop."""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def close(self) -> None:
|
def close(self) -> bool:
|
||||||
"""Close the Application."""
|
"""Close the Application."""
|
||||||
if self.operating_state == ApplicationOperatingState.RUNNING:
|
if self.operating_state == ApplicationOperatingState.RUNNING:
|
||||||
self.sys_log.info(f"Closed Application{self.name}")
|
self.sys_log.info(f"Closed Application{self.name}")
|
||||||
|
|||||||
@@ -111,6 +111,19 @@ def test_query_when_client_is_closed(database_client_on_computer):
|
|||||||
assert database_client.query(sql="test") is False
|
assert database_client.query(sql="test") is False
|
||||||
|
|
||||||
|
|
||||||
|
def test_query_fail_to_connect(database_client_on_computer):
|
||||||
|
"""Database client query should return False if the connect attempt fails."""
|
||||||
|
database_client, computer = database_client_on_computer
|
||||||
|
|
||||||
|
def return_false():
|
||||||
|
return False
|
||||||
|
|
||||||
|
database_client.connect = return_false
|
||||||
|
database_client.connected = False
|
||||||
|
|
||||||
|
assert database_client.query(sql="test") is False
|
||||||
|
|
||||||
|
|
||||||
def test_client_receives_response_when_closed(database_client_on_computer):
|
def test_client_receives_response_when_closed(database_client_on_computer):
|
||||||
"""Database client receive should return False when it is closed."""
|
"""Database client receive should return False when it is closed."""
|
||||||
database_client, computer = database_client_on_computer
|
database_client, computer = database_client_on_computer
|
||||||
|
|||||||
Reference in New Issue
Block a user