Skip to content

Commit

Permalink
feat: Store load test run
Browse files Browse the repository at this point in the history
Allows the monitor to wait until the run starts and share the run id with the load test script.
  • Loading branch information
bmtcril committed Mar 25, 2024
1 parent 76c3862 commit a0acb4a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ def check_for_run_id(self) -> Union[str, None]:
timeout=self.ch_timeout_secs,
)

response.raise_for_status()

# ClickHouse will respond with the ID and a newline or an empty string
return response.text.strip()

Expand All @@ -97,7 +99,7 @@ def test_has_ended(self) -> bool:
query = f"""
SELECT run_id
FROM {self.ch_runs_table} runs
WHERE run_id = {self.run_id}
WHERE run_id = '{self.run_id}'
AND event_type = 'end'
"""

Expand All @@ -109,6 +111,7 @@ def test_has_ended(self) -> bool:
)

log.info(response.text)
response.raise_for_status()

# ClickHouse will respond with the ID and a newline or an empty string
return response.text.strip() == self.run_id
Expand Down

0 comments on commit a0acb4a

Please sign in to comment.