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

schutzbot: use -test.timeout argument #606

Merged
merged 1 commit into from May 12, 2020

Conversation

larskarlitski
Copy link
Contributor

Use golang's test.timeout to set the timeout instead of using
ansible's async property. The latter doesn't respect register when
running into a timeout, which means there are no logs in that case.

Simplify these playbooks by setting ignore_errors: true on the
command module, so that it's easier to collect logs.

stdout:
{{ async_test.stdout }}
- name: "Run {{ test.name }} test"
command: "{{ tests_path }}/{{ test.name }} -test.v -test.timeout {{ test.timeout * 60}}s"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need a little bit of whitespace after the 60, like {{ test.timeout * 60 }}

# upset and nobody likes it when that happens.
- name: "Run image tests"
command: |
{{ image_test_executable }} -test.v -test.timeout {{image_test_timeout * 60}}s \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need a little bit of whitespace after the 60, like {{ test.timeout * 60 }}

Use golang's `test.timeout` to set the timeout instead of using
ansible's `async` property. The latter doesn't respect `register` when
running into a timeout, which means there are no logs in that case.
@larskarlitski
Copy link
Contributor Author

Update to keep using block / rescue. I was confused in thinking that wouldn't work anymore, but it does and keeps this change much smaller. Thanks @major!

Need a little bit of whitespace after the 60, like {{ test.timeout * 60 }}

Oops. Fixed.

@major major merged commit 6c611b4 into osbuild:master May 12, 2020
@larskarlitski larskarlitski deleted the ansible-timeouts branch May 12, 2020 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants