Skip to content

Commit

Permalink
[#52286] frontend_tester: Fixed parameter name, increased randomness …
Browse files Browse the repository at this point in the history
…of logs

Signed-off-by: Grzegorz Latosinski <[email protected]>
  • Loading branch information
glatosinski committed Dec 7, 2023
1 parent 20e5149 commit 700174b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"default": 10
},
{
"name": "MessageRate",
"type": "slider",
"min": 0.001,
"max": 1,
"default": 0.5
"name": "MessagesPerSecond",
"type": "number",
"min": 0.0001,
"max": 2000,
"default": 20
}
],
"interfaces": [
Expand Down
8 changes: 4 additions & 4 deletions pipeline_manager/frontend_tester/tester_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ async def _run_validate_response(
self.running[method_name] = True
terminal_name = properties["TerminalName"]
message_length = properties["MessageLength"]
rate = properties["MessageRate"]
rate = properties["MessagesPerSecond"]

await self.client.notify(
'progress_change',
Expand All @@ -394,17 +394,17 @@ async def _run_validate_response(
counter = 0
while self.running[method_name]:
random_message = ''.join(random.choices(
string.ascii_uppercase + string.digits,
list(string.ascii_uppercase + string.digits) + ['\r\n'],
k=message_length
))
await self.client.notify(
'terminal_write',
{
'name': terminal_name,
'message': f'Message {counter}: {random_message}\r\n'}
'message': f'{random_message}'}
)
counter += 1
await asyncio.sleep(rate)
await asyncio.sleep(1 / rate)
elif found == RUN:
self.running[method_name] = True
steps = properties["ProgressMessages"]
Expand Down

0 comments on commit 700174b

Please sign in to comment.