Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing retries from classic output. [WIP] #637

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions tests/testflows/tests/automated/e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ def gh_api_check(self):
with When("I go to clickhouse dashboard"):
dashboards.open_dashboard(dashboard_name="gh-api")

for attempt in retries(delay=5, timeout=50):
with attempt:
with delay():
with Then("I take screenshot of Pull request events for grafana/grafana panel"):
dashboard.take_screenshot_for_panel(panel_name="Pull request events for grafana/grafana", screenshot_name="gh-api_panel")

with delay():
with Then("I check graph contains data"):
assert actions.check_screenshot_contains_green(screenshot_name="gh-api_panel") is True, error()
with Then("I check gh-api datasource works correctly"):
for attempt in retries(delay=5, timeout=50):
with attempt:
with delay():
with Then("I take screenshot of Pull request events for grafana/grafana panel"):
dashboard.take_screenshot_for_panel(panel_name="Pull request events for grafana/grafana", screenshot_name="gh-api_panel")

with delay():
with Then("I check graph contains data"):
assert actions.check_screenshot_contains_green(screenshot_name="gh-api_panel") is True, error()


@TestCheck
Expand Down
33 changes: 17 additions & 16 deletions tests/testflows/tests/automated/sql_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,28 +308,29 @@ def extrapolation_toggle(self):
with delay():
panel.click_run_query_button()

for attempt in retries(delay=10, count=6):
with attempt:
with When("I click on run query button to see results with turned on extrapolation"):
panel.click_run_query_button()
with Then("I check extrapolation toggle works correctly"):
for attempt in retries(delay=10, count=6):
with attempt:
with When("I click on run query button to see results with turned on extrapolation"):
panel.click_run_query_button()

with When("I take screenshot with extrapolation"):
panel.take_screenshot_for_visualization(screenshot_name='extrapolation_toggle_on')
with When("I take screenshot with extrapolation"):
panel.take_screenshot_for_visualization(screenshot_name='extrapolation_toggle_on')

with When("I click on the extrapolation toggle to turn extrapolation off"):
sql_editor.click_extrapolation_toggle(query_name='A')
with When("I click on the extrapolation toggle to turn extrapolation off"):
sql_editor.click_extrapolation_toggle(query_name='A')

with When("I click on run query button to see results with turned off extrapolation"):
panel.click_run_query_button()
with When("I click on run query button to see results with turned off extrapolation"):
panel.click_run_query_button()

with When("I take screenshot without extrapolation"):
panel.take_screenshot_for_visualization(screenshot_name='extrapolation_toggle_off')
with When("I take screenshot without extrapolation"):
panel.take_screenshot_for_visualization(screenshot_name='extrapolation_toggle_off')

with When("I click on the extrapolation toggle to turn extrapolation on"):
sql_editor.click_extrapolation_toggle(query_name='A')
with When("I click on the extrapolation toggle to turn extrapolation on"):
sql_editor.click_extrapolation_toggle(query_name='A')

with Then("I check screenshots are different"):
assert not(actions.compare_screenshots(screenshot_name_1='extrapolation_toggle_on', screenshot_name_2='extrapolation_toggle_off'))
with Then("I check screenshots are different"):
assert not(actions.compare_screenshots(screenshot_name_1='extrapolation_toggle_on', screenshot_name_2='extrapolation_toggle_off'))

finally:
with Finally("I return Step textfield and Resolution dropdown values back"):
Expand Down
Loading