Commit 8a88338
committed
Add missing timeout when calling entity with timeout (#1311)
I found this issue while working on a Robottelo upgrade scenario
refactor. I found that a test syncing the RHEL 7 server RPMs repo was
consistently timing out after 300 seconds, though the
`enable_sync_redhat_repo` API factory method uses a timeout of 1500
seconds by default. Eventually, I found that
`nailgun.entity_mixins.call_entity_with_timeout()` was invoking the
entity callable without specifically passing the timeout. After the repo
sync was initiated, `nailgun.entity_mixins._poll_task()` was being
called with no timeout value specified, causing the `timeout` variable
to be set to the `TASK_TIMEOUT` constant defined in the entity_mixins
module, which has a value of 300 seconds. My repo sync was completing in
~360 seconds, so the test was consistently failing.
This PR adds a `timeout` keyword argument to the `entity_callable()` in
`call_entity_with_timeout()` and, in the repository `sync()` entity
method, changes the `timeout` argument in the call to
`_handle_response()` from a keywork argument to a positional argument.1 parent f91de8d commit 8a88338
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6367 | 6367 | | |
6368 | 6368 | | |
6369 | 6369 | | |
6370 | | - | |
| 6370 | + | |
6371 | 6371 | | |
6372 | 6372 | | |
6373 | 6373 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
0 commit comments