Skip to content

Commit

Permalink
Tweaks to help on github actons
Browse files Browse the repository at this point in the history
Increase retry time for loading and operations

Only run a subset of operations in test_run_operation_stack_safe
  • Loading branch information
samtygier-stfc committed Aug 25, 2021
1 parent e767e4f commit 6896c9f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
shell: bash -l {0}
run: |
xvfb-run --auto-servernum python -m pytest -vs -rs -p no:xdist -p no:randomly -p no:repeat -p no:cov --run-system-tests
timeout-minutes: 15
timeout-minutes: 20

- name: GUI Tests Applitools
if: ${{ github.event_name == 'pull_request' }}
Expand Down
2 changes: 1 addition & 1 deletion mantidimaging/gui/test/gui_system_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def test_func() -> bool:
self.main_window.load_dialogue.presenter.notify(Notification.UPDATE_ALL_FIELDS)
QTest.qWait(SHOW_DELAY)
self.main_window.load_dialogue.accept()
self._wait_until(test_func)
self._wait_until(test_func, max_retry=600)

def _open_operations(self):
self.main_window.actionFilters.trigger()
Expand Down
2 changes: 1 addition & 1 deletion mantidimaging/gui/test/test_gui_system_loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_func() -> bool:
current_stacks = len(self.main_window.presenter.model.get_all_stack_visualisers())
return (current_stacks - initial_stacks) >= 1

self._wait_until(test_func)
self._wait_until(test_func, max_retry=600)

@classmethod
def _click_stack_selector(cls):
Expand Down
4 changes: 2 additions & 2 deletions mantidimaging/gui/test/test_gui_system_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ def test_run_operation_stack(self, op_name, params):
self.op_window.safeApply.setChecked(False)
QTest.mouseClick(self.op_window.applyButton, Qt.MouseButton.LeftButton)
QTest.qWait(SHORT_DELAY)
self._wait_until(lambda: self.op_window.presenter.filter_is_running is False)
self._wait_until(lambda: self.op_window.presenter.filter_is_running is False, max_retry=600)

self.main_window.filters.close()
QTest.qWait(SHOW_DELAY)

@parameterized.expand(product(OP_LIST, ["new", "original"]))
@parameterized.expand(product(OP_LIST[:3], ["new", "original"]))
def test_run_operation_stack_safe(self, op_info, keep_stack):
op_name, params = op_info
print(f"test_run_operation_stack_safe {op_name=} {params=} {keep_stack=}")
Expand Down

0 comments on commit 6896c9f

Please sign in to comment.