Skip to content
Snippets Groups Projects
Unverified Commit d69aadfe authored by SKAJohanVenter's avatar SKAJohanVenter
Browse files

SAR-276 Spelling and test updates

parent a725df0a
No related branches found
No related tags found
No related merge requests found
...@@ -395,7 +395,7 @@ class ReferenceBaseComponentManager(BaseComponentManager): ...@@ -395,7 +395,7 @@ class ReferenceBaseComponentManager(BaseComponentManager):
class QueueWorkerComponentManager(BaseComponentManager): class QueueWorkerComponentManager(BaseComponentManager):
"""A component manager that configres the queue manager.""" """A component manager that configures the queue manager."""
def __init__( def __init__(
self, self,
......
""" """
This module provides a QueueManager, TaskResult and QueueTask classes. This module provides a QueueManager, TaskResult and QueueTask classes.
* **TaskUniqueId**: is a convenience `dataclass` for parsing and generating the IDs used * **TaskUniqueId**: is a convenience class for parsing and generating the IDs used
to identify the tasks. to identify the tasks.
* **TaskResult**: is a convenience `dataclass` for parsing and formatting the * **TaskResult**: is a convenience class for parsing and formatting the
results of a task. results of a task.
* **QueueTask**: is a class that instances of which can be added to the queue for execution * **QueueTask**: is a class that instances of which can be added to the queue for execution
......
...@@ -33,7 +33,7 @@ class TestCommands: ...@@ -33,7 +33,7 @@ class TestCommands:
proxy.Short(1) proxy.Short(1)
# Wait for a result, if the task does not abort, we'll time out here # Wait for a result, if the task does not abort, we'll time out here
while not proxy.longRunningCommandResult: while not proxy.longRunningCommandResult:
pass time.sleep(0.1)
result = TaskResult.from_task_result(proxy.longRunningCommandResult) result = TaskResult.from_task_result(proxy.longRunningCommandResult)
assert result.result_code == ResultCode.OK assert result.result_code == ResultCode.OK
...@@ -48,7 +48,7 @@ class TestCommands: ...@@ -48,7 +48,7 @@ class TestCommands:
proxy.NonAbortingLongRunning(0.01) proxy.NonAbortingLongRunning(0.01)
# Wait for a result, if the task does not abort, we'll time out here # Wait for a result, if the task does not abort, we'll time out here
while not proxy.longRunningCommandResult: while not proxy.longRunningCommandResult:
pass time.sleep(0.1)
result = TaskResult.from_task_result(proxy.longRunningCommandResult) result = TaskResult.from_task_result(proxy.longRunningCommandResult)
assert result.result_code == ResultCode.OK assert result.result_code == ResultCode.OK
assert ( assert (
...@@ -68,12 +68,12 @@ class TestCommands: ...@@ -68,12 +68,12 @@ class TestCommands:
unique_id, _ = proxy.AbortingLongRunning(0.5) unique_id, _ = proxy.AbortingLongRunning(0.5)
# Wait for the task to be in progress # Wait for the task to be in progress
while not proxy.longRunningCommandStatus: while not proxy.longRunningCommandStatus:
pass time.sleep(0.1)
# Abort the tasks # Abort the tasks
proxy.AbortCommands() proxy.AbortCommands()
# Wait for a result, if the task does not abort, we'll time out here # Wait for a result, if the task does not abort, we'll time out here
while not proxy.longRunningCommandResult: while not proxy.longRunningCommandResult:
pass time.sleep(0.1)
result = TaskResult.from_task_result(proxy.longRunningCommandResult) result = TaskResult.from_task_result(proxy.longRunningCommandResult)
assert result.unique_id == unique_id assert result.unique_id == unique_id
assert result.result_code == ResultCode.ABORTED assert result.result_code == ResultCode.ABORTED
...@@ -87,7 +87,7 @@ class TestCommands: ...@@ -87,7 +87,7 @@ class TestCommands:
with DeviceTestContext(class_name, process=True) as proxy: with DeviceTestContext(class_name, process=True) as proxy:
unique_id, _ = proxy.LongRunningException() unique_id, _ = proxy.LongRunningException()
while not proxy.longRunningCommandResult: while not proxy.longRunningCommandResult:
pass time.sleep(0.1)
result = TaskResult.from_task_result(proxy.longRunningCommandResult) result = TaskResult.from_task_result(proxy.longRunningCommandResult)
assert result.unique_id == unique_id assert result.unique_id == unique_id
assert result.result_code == ResultCode.FAILED assert result.result_code == ResultCode.FAILED
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment